Binding ObjectDataSource Component to a DataTable
The following example illustrates how to use a DataTable
as the source for an ObjectDataSource
component. The code below additionally creates a calculated field that can be used in the report definition in the same way as a regular field. The example demonstrates also how to configure the report to use the ObjectDataSource
and how to preview it in the Windows Forms Report Viewer with code.
The ObjectDataSource
component may be configured in the Telerik Report Designers without the need for writing additional code. It may be necessary to extend the Reporting engine to recognize the custom assembly with the data providing logic through the assemblyReferences Element in the Telerik.Reporting
section of the designer's configuration file.
To use this code in the Report Designer Tools, the data retrival methods must be built in separate assembly and specifically configured before it can be resolved by the Report Designers - Connecting the ObjectDataSource component to a Data Source