Dev XtraReport 正在打印弹出框如何隐藏 批量打印 静默打印
生活随笔
收集整理的這篇文章主要介紹了
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();//************************************<<<<<<
}
-------------------我思考了半天 網上沒有例子 我就先給出來了 如果對你有幫助 ? 望客官打賞下-------------
?
轉載于:https://www.cnblogs.com/shangdishijiao/p/10710731.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的Dev XtraReport 正在打印弹出框如何隐藏 批量打印 静默打印的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 3-无重复字符的最长子串(中等)
- 下一篇: django 通过数据库表名获取app