0

这是我的代码

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

第二行向我抛出 "[CrystalDecisions.CrystalReports.Engine.LogOnException] = {"\rError in File C:\Users\Prince\AppData\Local\Temp\report {1D0F4138-EB7B-4725-8B41-DCF38019B2C9}.rpt: \n无法连接:登录参数不正确。"}" 。有什么我错过的吗...

4

1 回答 1

0

不要在您的路径中设置报告

ReportDocument rpt = new ReportDocument();
                rpt.Load(Server.MapPath("/report.rpt"));
                rpt.PrintToPrinter(1, true, 0, 0);
于 2012-08-24T23:30:26.593 回答