I need to print a receipt on thermal paper from Crystal Reports. I created a print layout which works fine if printed from the preview. If I try to print from code, the printer just rolls out empty paper. The printer is installed properly (POS58). How can I properly print this from code?
ReportDocument rptDoc = new ReportDocument();
rptDoc.Load(Directory.GetCurrentDirectory() + @"\Reports\receipt.rpt");
rptDoc.SetParameterValue("pOrderID",OrderID);
rptDoc.PrintOptions.PrinterName = "POS58";
rptDoc.PrintToPrinter(1,false,0,0);