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();//************************************<<<<<<


    }

      

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

  • 相关阅读:
    luogu P3375 【模板】KMP字符串匹配
    leetcode[129]Sum Root to Leaf Numbers
    leetcode[130]Surrounded Regions
    leetcode[131]Palindrome Partitioning
    leetcode[132]Palindrome Partitioning II
    leetcode[133]Clone Graph
    leetcode[134]Gas Station
    leetcode[135]Candy
    leetcode[136]Single Number
    leetcode[137]Single Number II
  • 原文地址:https://www.cnblogs.com/shangdishijiao/p/10710731.html
Copyright © 2011-2022 走看看