Developer Express 之 XtraReport报表预览控件PrintControl设置
2016-02-25 00:00
363 查看
代码如下:
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如何显示设计窗体
- Developer Express 之 XtraGridView如何动态控制列的显示
- 关于Developer Express v2010汉化问题缺少程序集引用
- Developer Express 之 XtraReport如何动态绑定数据
- 企业网站更新时应该注意些什么
- 如何配置Nginx做高可用
- 强行删除mac中的文件
- VS2012发布网站详细步骤,同样适合vs2013,亲身试过
- Linux(CentOS6) zeromq编译安装
- Java9积极解决Linux中的GTK GUI难题
- Linux下同步模式、异步模式、阻塞调用、非阻塞调用总结
- copy & mutableCopy
- Mac虚拟机(parallels desktop)的安装使用
- JVM 监控--jvisualvm
- 复制DropDownList
- SSH连接下复制远程linux服务器文件到本地的命令
- 使用 Jersey 和 Apache Tomcat 构建 RESTful Web 服务
- Linux中的In命令
- Centos 7 网卡bug一例
- eclipse导入的web项目不能部署到tomcat,显示为java项目