Когда мы устанавливаем параметр с помощью. SetParameterValue()
, отчет не будет запущен и выдает исключение: таблица не найдена.
CrystalDecisions.CrystalReports.Engine.DataSourceException: ошибка в файле 31 77792_72788_{CACA007E-62DB-4EED-804A-915E3ED04293} .rpt: таблица не найдена.---> System.Runtime.InteropServices.COMException:
ReportDocument r = new ReportDocument();
r.Load("31.rpt");
SetReportConnection(r);
// This line removed, and it works fine with the default parameters...
r.SetParameterValue("BOOKFROM", 201701);
r.ExportToDisk(ExportFormatType.PortableDocFormat, "test.pdf");