使用asp.net webApi 中的存储过程创建了一个水晶报表并尝试通过打印 网络打印机在 A6 纸上使用多用途托盘,但从本地主机打印需要很长时间,并且在 iis 部署后需要更多时间(大约 1 分钟)。
非常感谢您的帮助。
IDTagSP rpt = new IDTagSP();
rpt.SetDatabaseLogon("sa", "xxxxxxxx", "xxxxxx", "EC_CompTraceability");
rpt.SetParameterValue("@pono", PM.PONO);
rpt.PrintOptions.PrinterName = printername;
SetDefaultPrinter(printername);
System.Drawing.Printing.PaperSource pkSource = new
System.Drawing.Printing.PaperSource();
pkSource.RawKind = 4;
pkSource.SourceName = "Multipurpose tray";
rpt.PrintOptions.CustomPaperSource = pkSource;
int rawKind = 257;
rpt.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)rawKind;
//PrintReportOptions options = new PrintReportOptions();
//options.PrinterName = printername;
//options.PaperSize = (CrPaperSizeEnum)rawKind;
//options.PaperSource = (CrPaperSourceEnum)pkSource.RawKind;
//rpt.ReportClientDocument.PrintOutputController.PrintReport(options);
rpt.PrintToPrinter(1, false, 0, 0);