Occurs when a subreport is processed.
Assembly: Microsoft.ReportViewer.WebForms (in Microsoft.ReportViewer.WebForms.dll)
Theevent is triggered for every instance of the subreport in the main report, and not just for each subreport definition. If a report contains multiple subreports instances from the same report definition, this event is triggered for each instance.
You must supply data for any data sources used in subreports. To do this, you must supply an event handler for theevent.
You can examine values of parameters passed to the subreport by examining the Parameters property and supplying data corresponding to those parameter values.
If the main report has several subreports, you can examine the ReportPath property of the SubreportProcessingEventArgs class to determine which subreport is being processed and supply data for that subreport.
Please see SubreportProcessingEventArgs for a description of the arguments passed to this event handler.
Legacy Code Example
The following code example implements a master/detail report using subreports. The code loads a sample report that contains a subreport and sets up an event handler to handle theevent. The arguments passed to the event handler include an object encapsulating the subreport. The event handler adds a data source instance to this subreport before it is rendered in the ReportViewer control.