locked
local report processing error on microsoftReportViewer RRS feed

  • Question

  • The bellow code  occur Exception is: on local report processing on ReportViewer.

    i use the microsoft reportViewer on winform .

    Reportviewer to export the report to Excel format.

    that time occur Exception on LocalReport rendering event place.

    how to resolve this  Exception .plz assist with me

     ReportViewer reportViewer = new ReportViewer();
                reportViewer.ProcessingMode = ProcessingMode.Local;
                reportViewer.LocalReport.LoadReportDefinition(m_rdl);
                reportViewer.LocalReport.DataSources.Add(new ReportDataSource("MyData", m_dataSet.Tables[0]));
                //reportViewer.RefreshReport();

      ReportFormat reportType = ReportFormat.Excel;
                if (filePath.EndsWith(".pdf", StringComparison.InvariantCultureIgnoreCase))
                {
                    reportType = ReportFormat.PDF;
                }

                byte[] bytes = reportViewer.LocalReport.Render(
                    reportType.ToString(), null, out mimeType, out encoding, out filenameExtension,
                    out streamids, out warnings);

    Saturday, August 28, 2010 6:26 AM

All replies