当前位置: 首页 > 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)
  • C++11: atomic 头文件
  • es6
  • FineReport中如何实现自动滚屏效果
  • github从入门到放弃(1)
  • IndexedDB
  • Linux后台研发超实用命令总结
  • Linux下的乱码问题
  • PHP变量
  • Redis的resp协议
  • vue-loader 源码解析系列之 selector
  • vue从入门到进阶:计算属性computed与侦听器watch(三)
  • 百度贴吧爬虫node+vue baidu_tieba_crawler
  • 大快搜索数据爬虫技术实例安装教学篇
  • 当SetTimeout遇到了字符串
  • 关于springcloud Gateway中的限流
  • 关于字符编码你应该知道的事情
  • 人脸识别最新开发经验demo
  • 什么软件可以剪辑音乐?
  • 思否第一天
  • 吴恩达Deep Learning课程练习题参考答案——R语言版
  • 新书推荐|Windows黑客编程技术详解
  • 【运维趟坑回忆录】vpc迁移 - 吃螃蟹之路
  • 3月7日云栖精选夜读 | RSA 2019安全大会:企业资产管理成行业新风向标,云上安全占绝对优势 ...
  • kubernetes资源对象--ingress
  • ​ubuntu下安装kvm虚拟机
  • #if和#ifdef区别
  • #我与Java虚拟机的故事#连载17:我的Java技术水平有了一个本质的提升
  • (20)目标检测算法之YOLOv5计算预选框、详解anchor计算
  • (C语言)球球大作战
  • (react踩过的坑)Antd Select(设置了labelInValue)在FormItem中initialValue的问题
  • (机器学习的矩阵)(向量、矩阵与多元线性回归)
  • (机器学习-深度学习快速入门)第三章机器学习-第二节:机器学习模型之线性回归
  • (三)centos7案例实战—vmware虚拟机硬盘挂载与卸载
  • (转)IIS6 ASP 0251超过响应缓冲区限制错误的解决方法
  • (转)JVM内存分配 -Xms128m -Xmx512m -XX:PermSize=128m -XX:MaxPermSize=512m
  • (转)原始图像数据和PDF中的图像数据
  • .NET 8 中引入新的 IHostedLifecycleService 接口 实现定时任务
  • .net core 依赖注入的基本用发
  • .net php 通信,flash与asp/php/asp.net通信的方法
  • .NET Standard 支持的 .NET Framework 和 .NET Core