当前位置: 首页 > news >正文

[Dxperience.8.*]报表预览控件PrintControl设置

整理的对PrintControl进行设置的代码

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  WindowsFormsApplication1
{
    
public   partial   class  XtraForm2 : DevExpress.XtraEditors.XtraForm
    {
        
public  XtraForm2()
        {
            InitializeComponent();
        }

        
private   void  XtraForm2_Load( object  sender, EventArgs e)
        {
            
            XtraReport fXtraReport 
=   new  XtraReport();
            
// fXtraReport.LoadLayout(@"C:\1.repx");

            PrintingSystem printingSystem1 
=   new  PrintingSystem();

            PrintControl printControl1 
=   new  PrintControl();
            printControl1.PrintingSystem 
=  printingSystem1;


            PrintBarManager printBarManager 
=   new  PrintBarManager();
            printBarManager.Form 
=  printControl1;
            printBarManager.Initialize(printControl1);
            printBarManager.MainMenu.Visible 
=   false ;
            printBarManager.AllowCustomization 
=   false ;

            printingSystem1.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.PrintingSystem 
=  printingSystem1;
            fXtraReport.CreateDocument();

            Controls.Add(printControl1);
            printControl1.Dock 
=  DockStyle.Fill;
        }
    }
}

转载于:https://www.cnblogs.com/rock_chen/archive/2008/07/02/1233994.html

相关文章:

  • “”(十六进制值 0x1D)是无效的字符
  • 每个开发人员现在应该下载的十种必备工具
  • 【海量视频】2013年上半年BPM厂商'K2'市场活动资料集锦
  • 2019牛客暑期多校训练营(第二场) - J - Go on Strike! - 前缀和预处理
  • OS的发展和分类
  • VBScript 内置函数
  • P1020 导弹拦截(nlogn求最长不下降子序列)
  • P1090 合并果子(哈弗曼树)
  • 推荐阅读链接
  • MySQL 5.7 zip 安装
  • P1004 方格取数(四维动态规划)
  • SCRUM Day 8
  • 2.3_Database Interface ODBC组成原理
  • 石子合并(区间dp典型例题)
  • 石子合并2(环形求最优解 区间dp)
  • 《Java8实战》-第四章读书笔记(引入流Stream)
  • 【391天】每日项目总结系列128(2018.03.03)
  • 【MySQL经典案例分析】 Waiting for table metadata lock
  • 【挥舞JS】JS实现继承,封装一个extends方法
  • 2018一半小结一波
  • Android Studio:GIT提交项目到远程仓库
  • echarts的各种常用效果展示
  • ES6之路之模块详解
  • Idea+maven+scala构建包并在spark on yarn 运行
  • java概述
  • Making An Indicator With Pure CSS
  • mysql中InnoDB引擎中页的概念
  • PermissionScope Swift4 兼容问题
  • PHP变量
  • ReactNative开发常用的三方模块
  • Redash本地开发环境搭建
  • Vultr 教程目录
  • Web Storage相关
  • 工作踩坑系列——https访问遇到“已阻止载入混合活动内容”
  • 技术攻略】php设计模式(一):简介及创建型模式
  • 前端技术周刊 2019-01-14:客户端存储
  • 前言-如何学习区块链
  • 使用权重正则化较少模型过拟合
  • ionic入门之数据绑定显示-1
  • 阿里云IoT边缘计算助力企业零改造实现远程运维 ...
  • 选择阿里云数据库HBase版十大理由
  • ​LeetCode解法汇总1276. 不浪费原料的汉堡制作方案
  • ​渐进式Web应用PWA的未来
  • ​一些不规范的GTID使用场景
  • #传输# #传输数据判断#
  • (02)vite环境变量配置
  • (C++20) consteval立即函数
  • (一)C语言之入门:使用Visual Studio Community 2022运行hello world
  • (已更新)关于Visual Studio 2019安装时VS installer无法下载文件,进度条为0,显示网络有问题的解决办法
  • (转) Android中ViewStub组件使用
  • ***测试-HTTP方法
  • ***微信公众号支付+微信H5支付+微信扫码支付+小程序支付+APP微信支付解决方案总结...
  • ./mysql.server: 没有那个文件或目录_Linux下安装MySQL出现“ls: /var/lib/mysql/*.pid: 没有那个文件或目录”...
  • .net MVC中使用angularJs刷新页面数据列表
  • .NET 常见的偏门问题