xtrareport 的使用方法

上传人:20****03 文档编号:178995786 上传时间:2021-04-06 格式:DOC 页数:11 大小:133.50KB
返回 下载 相关 举报
xtrareport 的使用方法_第1页
第1页 / 共11页
xtrareport 的使用方法_第2页
第2页 / 共11页
xtrareport 的使用方法_第3页
第3页 / 共11页
xtrareport 的使用方法_第4页
第4页 / 共11页
xtrareport 的使用方法_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《xtrareport 的使用方法》由会员分享,可在线阅读,更多相关《xtrareport 的使用方法(11页珍藏版)》请在金锄头文库上搜索。

1、Xtrareport1, 此报表在设置时,paperkind中找不到自定义的纸张,所以我就在事件beforeprint中,this.Margins = new System.Drawing.Printing.Margins(10, 10, 10, 10); this.PaperKind = System.Drawing.Printing.PaperKind.Custom; this.PageWidth = 827; this.PageHeight = 584; this.PaperName = 21*132.加载已有模板xrpt1.LoadLayout(E:EMS.repx);Develope

2、r Express 之 XtraReport报表预览控件PrintControl设置usingSystem;02usingSystem.Collections.Generic;03usingSystem.ComponentModel;04usingSystem.Data;05usingSystem.Drawing;06usingSystem.Text;07usingSystem.Windows.Forms;08usingDevExpress.XtraEditors;09usingDevExpress.XtraReports.UI;10usingDevExpress.XtraPrinting.P

3、review;11usingDevExpress.XtraPrinting;12usingDevExpress.XtraPrinting.Control;1314namespaceWFAXtraReport1516publicpartialclassForm1 : Form1718publicForm1 ()1920InitializeComponent();212223privatevoidForm1 _Load(objectsender, EventArgs e)242526XtraReport fXtraReport =newXtraReport();27/fXtraReport.Loa

4、dLayout(C:1.repx);2829PrintControl printControl1 =newPrintControl();30printControl1.PrintingSystem = fXtraReport.PrintingSystem;313233PrintBarManager printBarManager =newPrintBarManager();34printBarManager.Form = printControl1;35printBarManager.Initialize(printControl1);36printBarManager.MainMenu.Vi

5、sible =false;37printBarManager.AllowCustomization =false;3839/操作要显示什么按钮40printControl1.PrintingSystem.SetCommandVisibility(newPrintingSystemCommand41PrintingSystemCommand.Open,42PrintingSystemCommand.Save,43PrintingSystemCommand.ClosePreview,44PrintingSystemCommand.Customize,45PrintingSystemCommand.

6、SendCsv,46PrintingSystemCommand.SendFile,47PrintingSystemCommand.SendGraphic,48PrintingSystemCommand.SendMht,49PrintingSystemCommand.SendPdf,50PrintingSystemCommand.SendRtf,51PrintingSystemCommand.SendTxt,52PrintingSystemCommand.SendXls53, CommandVisibility.None);5455fXtraReport.CreateDocument();565

7、7Controls.Add(printControl1);58printControl1.Dock = DockStyle.Fill;596061关于XtraReport的功能还有很多,细节上的处理还有很多,留待以后再整理,先整理这几个常用的。posted 2010-12-06 21:10 CookBlack 阅读(423) | 评论(0) |编辑Developer Express 之 XtraReport如何显示设计窗体XtraReport的设计器,其实用XRDesignFormEx就可以。01usingSystem;02usingSystem.Collections.Generic;03u

8、singSystem.ComponentModel;04usingSystem.Data;05usingSystem.Drawing;06usingSystem.Linq;07usingSystem.Text;08usingSystem.Windows.Forms;09usingDevExpress.XtraReports.UI;10usingDevExpress.XtraReports.UserDesigner;11usingSystem.Drawing.Design;12usingSystem.ComponentModel.Design;1314namespaceWFAXtraReport

9、1516publicpartialclassForm1 : Form1718XtraReport r ;/这个可以是加载之前设计好的模板19publicForm1()2021InitializeComponent();222324privatevoiddesignForm_FormClosing(objectsender, FormClosingEventArgs e)2526/在此处处理关闭设计器时的操作,主要用来自定义保存数据27/r.SaveLayout(C:1.repx);282930privatevoiddesignForm_ReportStateChanged(objectsend

10、er, ReportStateEventArgs e)3132/只要报表发生改变就立即将状态设置为保存33/避免系统默认保存对话框的出现34if(e.ReportState = ReportState.Changed)3536(XRDesignFormEx)sender).DesignPanel.ReportState = ReportState.Saved;37383940privatevoidForm1_Load(objectsender, EventArgs e)4142r =newXtraReport();43/r.LoadLayout(C:1.repx);44XRDesignForm

11、Ex designForm =newXRDesignFormEx();4546/隐藏按钮47designForm.DesignPanel.SetCommandVisibility(newReportCommand48ReportCommand.NewReport,49ReportCommand.SaveFileAs,50ReportCommand.NewReportWizard,51ReportCommand.OpenFile52, CommandVisibility.None);535455/更改状态56designForm.ReportStateChanged +=newReportStateEventHandler(designForm_ReportStateChanged);5758designForm.FormClosing +=newFormClosingEvent

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 教学/培训

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号