|
WEB項目能否在水晶報表點擊打印按鈕直接打印 |
|
|
可以通過新增一個Button元件,然後在Click事件如下的寫法: CrystalDecisions.CrystalReports.Engine.ReportDocument rd = new CrystalDecisions. CrystalReports.Engine.ReportDocument(); rd.Load(Server.MapPath("CRPOS.rpt")); rd.PrintOptions.PrinterName = "EPSON ME 1"; try { rd.PrintToPrinter(1, true, 0, 0); } catch { Response.Write(""); }
|
|
|