Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / SSRS

SSRS - Error: Subreport could not be shown

0.00/5 (No votes)
10 Nov 2011CPOL 11.6K  
I tried this for the second subreport, Table2, but no subreport for Table2 was displayed:METHOD SubReportEventHandler(sender AS OBJECT, e AS SubreportProcessingEventArgs) AS VOID LOCAL oDS AS ReportDataSource LOCAL table AS datatable // fill table here with the...

I tried this for the second subreport, Table2, but no subreport for Table2 was displayed:


SQL
METHOD SubReportEventHandler(sender AS OBJECT, 
       e AS SubreportProcessingEventArgs) AS VOID
    LOCAL oDS   AS ReportDataSource
    LOCAL table AS datatable
    // fill table here with the appropriate data
    oDS                 := ReportDataSource{"SFMSales",Table}
    e:DataSources:Add(oDS)
oDS                 := ReportDataSource{"SFMSales",Table}
   e:DataSources:Add(oDS)
oDS := ReportDataSource{"SFMSales",Table2}

   e:DataSources:Add(oDS)

Both subreports are in the same directory. How shall I code for the second subreport inside the SubReportEventHandler?

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)