Crystal Report打印机问题-无法选择打印机-C#

时间:2018-08-06 05:32:43

标签: c#-4.0 printing crystal-reports-2010

我正在尝试通过热敏打印机发送打印crystel报告。 下面是代码,但是打印总是发送到默认打印机,而不是一个iam选择。

以下代码在USB打印机上工作正常。问题仅与热敏打印机有关 请帮助解决此问题,谢谢

代码:

ReportDocument rpt = new ReportDocument();
string path = Application.StartupPath;
path = path + "\\crKOT.rpt";                            
rpt.Load(path);                            
DataSet ds = new DataSet("DataSet1");
ds.Tables.Add(spliteddt);
ds.Tables[0].TableName = "KOTPrint";
rpt.SetDataSource(ds.Tables[0]);
string Kitchen_Printer = spliteddt.Rows[0]["Printer_Name"].ToString();
short NoOfCopy = Convert.ToInt16(spliteddt.Rows[0]["NoOfCopies"]);
rpt.PrintOptions.PrinterName = Kitchen_Printer;
rpt.PrintToPrinter(NoOfCopy, true, 0, 0);

0 个答案:

没有答案
相关问题