Report data provider provides a mechanism to supply data which is needed in a report according to the defined data definitions. Each report data provider must be inherited from ReportDataProvider class. ReportDataProvider exposes some unimplemented methods which allow you to implement your own logic to provide the data.
Provides data for parameter editor
In some scenario, you may need to create a parameter which utilize UXComboBox, UXPageableComboBox, or UXMultipleSelectionComboBox as a parameter editor. The editor may comes with the predefined values which is retrieved from a data source. To provide the data, you need to implement ProvidesData method with a data provider argument passed along with it.
The data provider arguments contains some information which can be retrieved through it's properties, such as the related report document, target data source, and query descriptors. You can use these information to populate the data, and pass back the data through the Results property of data provider arguments. Make sure to call the MarkAsCompleted method right after it to tell the reporting engine if the data has been provided.
Provides data to be displayed in report
To provide data which will be displayed in a report, you must implement ProvidesData method with a report definition passed along with it as an argument. The report definition contains some information which can be retrieved through it's properties, such as the related report document, data definitions, object data sources, report parameters, and user defined parameter. You need to populate the data for all of the required data sources, and store it to the DataSources property of report definition. Make sure to call the MarkAsCompleted method right after it to tell the reporting engine if all of the data has been provided.
It’s important to understand that there are literally no constraints on the datasource you can use. You can retrieve data from domain service, web service, WCF service, or virtually any kind of objects that can be serialized over the wire. Object data source contains various information which can be used to retrieve data, such as object data source name, source type, stored procedure parameters, filter descriptors, and sort descriptors.
Register data source
You need to register the datasource which will be used inside the report data provider. The registered datasource's name should matches the name of object data source defined in report's data definitions. For more information about object data source, see ObjectDataSources Overview.