New to Telerik Reporting? Download free 30-day trial

Do I Need to Use a Data Source Component?

Environment

Product Progress® Telerik® Reporting

Description

The Telerik Reporting Data Source Components allow you to connect data items (e.g. Report, Table, Graph) to different types of data sources such as database or middle-tier business objects, without additional code. Note that they should not be confused with the .NET Data Sources available in the Visual Studio.

Telerik Reporting Data Source Components are intended to specify declaratively how to retrieve data for Data Items but do not contain any data themselves. Their purpose is only to specify the means how to obtain it (e.g. in the case of SqlDataSource - by executing a SQL query against a database, in the case of ObjectDataSource - by invoking a method/property of a custom business object, etc.). You can view the Data Source Components as wrappers for your data that can only read it and cannot modify it.

Solution

Having the above into account:

  1. Data source components are suitable:

    • When data can be retrieved from the server in a declarative manner e.g. a SQL query, or a custom data access layer that gets data records;
    • In technology specific scenarios, where data can be modified by the user and you need to display the updated records in a report, our recommendation is to save the updated data on the server and to use a data source component. This approach allows to use reports from any type of project - desktop, web.
  2. Data source components are not required:

In this article