SubreportProcessing Events
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

LocalReport.SubreportProcessing Event 

Occurs when a subreport is processed.

Namespace: Microsoft.Reporting.WinForms
Assembly: Microsoft.ReportViewer.WinForms (in microsoft.reportviewer.winforms.dll)

public:
event SubreportProcessingEventHandler^ SubreportProcessing {
	void add (SubreportProcessingEventHandler^ value);
	void remove (SubreportProcessingEventHandler^ value);
}
/** @event */
public void add_SubreportProcessing (SubreportProcessingEventHandler value)

/** @event */
public void remove_SubreportProcessing (SubreportProcessingEventHandler value)

JScript supports the use of events, but not the declaration of new ones.

You must supply data for any data sources used in subreports. To do this, you must supply an event handler for the SubreportProcessing event.

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.

For more information about the arguments passed to this event handler, see SubreportProcessingEventArgs.

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 the SubreportProcessing event. The arguments passed to the SubreportProcessing 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.

No code example is currently available or this language may not be supported.
Show:
© 2016 Microsoft