Am using VS 2008 and in one of ASP.Net web application am using RDLC report to generate PDF and showing the PDF in the browser window itself. It was working fine still 10 days before. Suddenly it stopped working giving the below error.
Microsoft.Reporting.WebForms.LocalProcessingExcept ion: An error occurred during local report processing. ---> Microsoft.ReportingServices.ReportProcessing.Proce ssingAbortedException: An error has occurred during report processing. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array. --- End of inner exception stack trace --- at Microsoft.Reporting.WebForms.LocalReport.InternalR ender(String format, Boolean allowInternalRenderers, String deviceInfo, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) at Microsoft.Reporting.WebForms.LocalReport.InternalR ender(String format, Boolean allowInternalRenderers, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings) at Microsoft.Reporting.WebForms.LocalReport.Render(St ring format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
Below is the code used to generate the PDF.
Expand|Select|Wrap|Line Numbers
- string mimeType;
- string encoding;
- string fileNameExtension;
- Warning[] warnings;
- string[] streams;
- ReportParameter myParam = new ReportParameter("Parameter1", "true");
- localReport.SetParameters(new ReportParameter[] { myParam });
- byte[] bytesPDF = localReport.Render("PDF", null, out mimeType, out encoding, out fileNameExtension, out streams, out warnings);
Thanks.