private void URT304RPT_ReportEnd(object sender, EventArgs e)
{
this.Document.Printer.PrinterName = “\\172.18.5.88\Canon LBP2900”;
this.Document.Print(false, false);
}
打印的时候也是在发布后出现异常。
System.ApplicationException: Failed to open the Default printer is not set. printer, System error number: 1801
at DataDynamics.ActiveReports.Document.DDPaperSize.#5g(String printerName, String paperName, Single width, Single height)
at DataDynamics.ActiveReports.Document.DDPaperSize..ctor(String printerName, String paperName, Single width, Single height)
at DataDynamics.ActiveReports.ActiveReport.#azb()
at DataDynamics.ActiveReports.ActiveReport.#1yb(Boolean bDelayedInit)
at DataDynamics.ActiveReports.ActiveReport.Run(Boolean syncDocument)
at DataDynamics.ActiveReports.ActiveReport.Run()
at URT304.URT304OUTPUT.ExcelOutPut(DataSet ds) in D:\SysRental\URT304\URT304OUTPUT.cs:line 69 |