0
votes

Here is my code

 ReportDocument rpt = new ReportDocument();
                rpt.Load(Server.MapPath("Reports/report.rpt"));
                rpt.PrintToPrinter(1, true, 0, 0);

The second line throws me "[CrystalDecisions.CrystalReports.Engine.LogOnException] = {"\rError in File C:\Users\Prince\AppData\Local\Temp\report {1D0F4138-EB7B-4725-8B41-DCF38019B2C9}.rpt:\nUnable to connect: incorrect log on parameters."}" . Is anything i missed ...

1

1 Answers

0
votes

don't set Reports in your path

ReportDocument rpt = new ReportDocument();
                rpt.Load(Server.MapPath("/report.rpt"));
                rpt.PrintToPrinter(1, true, 0, 0);