zoukankan      html  css  js  c++  java
  • Dev XtraReport 正在打印弹出框如何隐藏 批量打印 静默打印

     

    其实很简单 只是在事件里去改变PrintDocument 里面的   PrintController    下面//*******************************<<<<<<为重点代码

    private void InitializeComponent()
    {
    this.topMarginBand1 = new DevExpress.XtraReports.UI.TopMarginBand();
    this.detailBand1 = new DevExpress.XtraReports.UI.DetailBand();
    this.bottomMarginBand1 = new DevExpress.XtraReports.UI.BottomMarginBand();
    ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
    // 
    // topMarginBand1
    // 
    this.topMarginBand1.HeightF = 100F;
    this.topMarginBand1.Name = "topMarginBand1";
    // 
    // detailBand1
    // 
    this.detailBand1.HeightF = 100F;
    this.detailBand1.Name = "detailBand1";
    // 
    // bottomMarginBand1
    // 
    this.bottomMarginBand1.HeightF = 100F;
    this.bottomMarginBand1.Name = "bottomMarginBand1";
    // 
    // FrmReport
    // 
    this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] {
    this.topMarginBand1,
    this.detailBand1,
    this.bottomMarginBand1});
    this.Version = "14.2";
    this.PrintProgress += new DevExpress.XtraPrinting.PrintProgressEventHandler(this.FrmPrint_PrintProgress);
    this.DataSourceDemanded += new System.EventHandler<System.EventArgs>(this.FrmReport_DataSourceDemanded);
    this.BeforePrint += new System.Drawing.Printing.PrintEventHandler(this.FrmReport_BeforePrint);
    
    //setcomm();
    ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
    
    DevExpress.XtraPrinting.PrintingSystemBase mPSB = this.PrintingSystem;
    mPSB.StartPrint += new PrintDocumentEventHandler(this.FrmPrint_StartPrint);//************************************<<<<<<
    mPSB.EndPrint += mPSB_EndPrint;
    }
    

      

    ----------------------------------------------写事件---------------------

    private void FrmPrint_StartPrint(object sender, PrintDocumentEventArgs e)
    {

    //静默打印 修改 e.PrintDocument.PrintController = new System.Drawing.Printing.StandardPrintController();//************************************<<<<<<


    }

      

    -------------------我思考了半天 网上没有例子 我就先给出来了 如果对你有帮助   望客官打赏下-------------

  • 相关阅读:
    I.MX6ULL LED C程序(转自左忠凯)
    I.MX6ULL的LED汇编程序
    Linux中的信号
    springboot的模板引擎之简介区分(一)
    springboot常用Starter介绍
    springboot拦截器之Filter和拦截器Interceptor之间的区别(六)
    springboot拦截器之多个自定义拦截器Interceptor的执行顺序(五)
    springboot拦截器之自定义拦截器Interceptor以及新旧配置的对比(四)
    springboot拦截器之自定义监听器listener(三)
    springboot拦截器之自定义原生servlet(二)
  • 原文地址:https://www.cnblogs.com/shangdishijiao/p/10710731.html
Copyright © 2011-2022 走看看