i want to print crystal report , when i try to print with this code its giving me this error.
ERROR
A StartDocPrinter call was not issued Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ComponentModel.Win32Exception: A StartDocPrinter call was not issued Source Error: Line 227: Report.SetDataSource(dt); Line 228: Report.Refresh(); Line 229: Report.PrintToPrinter(1, false, 1, 1); Line 230: } Line 231:}
CODE
protected void Print(object sender, EventArgs e) { ReportDocument Report = new ReportDocument(); Report.Load(Server.MapPath("~/CrystalReport.rpt")); Report.SetDataSource(dt); Report.Refresh(); Report.PrintToPrinter(1, true, 1, 1); }