博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Developer Express 之 XtraReport报表预览控件PrintControl设置
阅读量:6970 次
发布时间:2019-06-27

本文共 2019 字,大约阅读时间需要 6 分钟。

hot3.png

代码如下:

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的功能还有很多,细节上的处理还有很多,留待以后再整理,先整理这几个常用的。

转载于:https://my.oschina.net/cookblack/blog/621365

你可能感兴趣的文章
apk反编后不作任何修改回编出错
查看>>
分享我对领域驱动设计(DDD)的学习成果
查看>>
oracle安装简洁步骤
查看>>
大型网站图片服务器架构的演进
查看>>
货币转换 I
查看>>
Cisco 划分VLAN
查看>>
写在最前
查看>>
使用zabbix监控Nginx活动状态--Part1
查看>>
spring的applicationContext.xml
查看>>
安全重要还是隐私重要?面部识别技术帮助警方发现枪击案枪手
查看>>
存preference
查看>>
建立基于虚拟用户的vsftpd服务
查看>>
jQuery Datatable 自定义列
查看>>
化妆品电商与供货商 一个词“暧昧”
查看>>
Raid,不可不知的Raid等级!
查看>>
删除MySQL log bin 日志操作记录
查看>>
在Oracle数据库启动时提示没有权限 ora-01031:insufficient privileges
查看>>
405不允许的方法从StaticFileModule
查看>>
我的友情链接
查看>>
通过eclipse调试MapReduce任务
查看>>