c# ReportDocument 类执行方法PrintToPrinter()方法时报错
ReportDocument rpt = new ReportDocument();rpt.Load(Application.StartupPath + @"\Reports\无卡支付挂号成功小票.rpt");
rpt.SetParameterValue("aaa", label1.Text);
rpt.SetParameterValue("bbb", label2.Text);
rpt.SetParameterValue("ccc", label3.Text);
rpt.PrintOptions.PrinterName = ConfigurationManager.AppSettings["print_name"];
//rpt.PrintToPrinter(1, false, 0, 0);
rpt.PrintToPrinter(1, true, 1, 1);
这段代码执行最后打印PrintToPrinter()方法的时候报错:未安装打印机。
该打印机为80mm的热敏打印机,可以打印出测试页。
但是上段同样的代码使用58mm的热敏打印机时却可以打印出内容。
在线等。 c# ReportDocument PrintToPrinter() --------------------编程问答-------------------- 大家没有硬件测试,可以告诉我思路就好了。或者说我还有哪些位置是没注意到的。 --------------------编程问答-------------------- ConfigurationManager.AppSettings["print_name"]能取到值吗?
--------------------编程问答--------------------
绝对能!!!
补充:.NET技术 , C#