65.9K
CodeProject is changing. Read more.
Home

SSRS - Error: Subreport could not be shown

emptyStarIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

0/5 (0 vote)

Nov 9, 2011

CPOL
viewsIcon

11568

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:

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?