Developer Express 之 XtraReport报表预览控件PrintControl设置
2010-12-06 21:10
393 查看
代码如下:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevExpress.XtraEditors; using DevExpress.XtraReports.UI; using DevExpress.XtraPrinting.Preview; using DevExpress.XtraPrinting; using DevExpress.XtraPrinting.Control; namespace WFAXtraReport { public partial class Form1 : Form { public Form1 () { InitializeComponent(); } private void Form1 _Load(object sender, EventArgs e) { XtraReport fXtraReport = new XtraReport(); //fXtraReport.LoadLayout(@"C:\1.repx"); PrintControl printControl1 = new PrintControl(); printControl1.PrintingSystem = fXtraReport.PrintingSystem; PrintBarManager printBarManager = new PrintBarManager(); printBarManager.Form = printControl1; printBarManager.Initialize(printControl1); printBarManager.MainMenu.Visible = false; printBarManager.AllowCustomization = false; //操作要显示什么按钮 printControl1.PrintingSystem.SetCommandVisibility(new PrintingSystemCommand[]{ PrintingSystemCommand.Open, PrintingSystemCommand.Save, PrintingSystemCommand.ClosePreview, PrintingSystemCommand.Customize, PrintingSystemCommand.SendCsv, PrintingSystemCommand.SendFile, PrintingSystemCommand.SendGraphic, PrintingSystemCommand.SendMht, PrintingSystemCommand.SendPdf, PrintingSystemCommand.SendRtf, PrintingSystemCommand.SendTxt, PrintingSystemCommand.SendXls }, CommandVisibility.None); fXtraReport.CreateDocument(); Controls.Add(printControl1); printControl1.Dock = DockStyle.Fill; } } }
关于XtraReport的功能还有很多,细节上的处理还有很多,留待以后再整理,先整理这几个常用的。
相关文章推荐
- Developer Express 之 XtraReport报表预览控件PrintControl设置
- Developer Express 之 XtraReport报表预览控件PrintControl设置
- [Dxperience.8.*]报表预览控件PrintControl设置
- 动态添加AjaxControl Toolkit的Tab控件及设置模板
- DEV控件:gridControl常用属性设置(转载)
- Crystal Report printControl (水晶报表打印)
- DEV控件:gridControl常用属性设置
- 报表参数控件和报表内容自动居中设置方法
- devexpress表格控件gridcontrol设置隔行变色、焦点行颜色、设置(改变)显示值、固定列不移动(附源码)
- 继承自TWinControl的控件不能在设计期间接受子控件,用代码设置子控件却可以(它的自绘是直接改写PaintWindow虚函数,而不是覆盖Paint函数——对TWinControl.WMPaint又有新解了)
- js(JQuery) 设置servercontrol(服务器控件)的text属性
- Xtrareport 报表的一些属性及控件
- DEV控件:gridControl常用属性设置
- 设置DevExpress GridControl控件时间列显示时、分、秒样式
- 报表参数控件和报表内容自动居中设置方法
- DEV控件:gridControl常用属性设置:获取选中行的值
- DEV控件:gridControl常用属性设置
- [转载]DEV控件:gridControl常用属性设置
- 一步一步学List Control控件的用法(第三步)----设置风格
- DEV控件:gridControl常用属性设置