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


}

  

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

Dev XtraReport 正在打印弹出框如何隐藏  批量打印  静默打印

 

相关文章:

  • 2022-12-23
  • 2021-08-02
  • 2021-11-12
  • 2021-05-23
  • 2022-12-23
  • 2022-01-19
  • 2022-02-16
猜你喜欢
  • 2022-12-23
  • 2021-12-15
  • 2021-09-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案