Progress® Telerik® Reporting R3 2021
Report.NeedDataSource Event
Occurs when the processing of the report processing instance (i.e., Report instance) begins
and this instance has no DataSource property set.
Namespace:
Telerik.ReportingAssembly: Telerik.Reporting (in Telerik.Reporting.dll)
Syntax
Remarks
The event is hooked on the definition Report instance,
but the sender object in the event handler is the processing Report instance.
The processing instance of the report inherits its DataSource from the definition instance,
but if neither has DataSource set, this event is raised.
Examples
The following example demonstrates how to implement a NeedDataSource event handler:
void report_NeedDataSource(object sender, EventArgs e) { Telerik.Reporting.Processing.Report processingReport = (Telerik.Reporting.Processing.Report)sender; object processingParameterValue = processingReport.Parameters["parameter1"].Value; processingReport.DataSource = GetData(processingParameterValue); } static object GetData(object value) { // Implement your custom data retrieval logic instead return new string[] { "Sofia", "London", "Tokyo" }; }
Version Information
Supported in: 1.0.1