Progress® Telerik® Reporting R2 2017

Reuse Data Source components across Reports

The article elaborates how to reuse a Data Source component across multiple reports.

Reuse data source components across reports in Visual Studio

You can create a custom component, inheriting a Telerik Reporting Data Source component, that is configured with the desired settings.

  1. From the Project menu select Add -> New Item

  2. In the Add New Item dialog box, choose a Component Class and click Add.

    The new file is added to the project and automatically opened in Visual Studio.

  3. Change the base class from Component to the appropriate Telerik Reporting Data Source component (Telerik.Reporting.SqlDataSource, Telerik.Reporting.ObjectDataSource, Telerik.Reporting.EntityDataSource, Telerik.Reporting.OpenAccessDataSource) as shown in the following code snippet:

    public partial class Component1 : Telerik.Reporting.SqlDataSource
  4. Save and rebuild the project.

  5. Right click the component class -> View Designer

  6. Click Configure data source

  7. Follow the wizard

  8. Save and rebuild

  9. The Project Data Source is now listed under the Project Data Sources node, if you run Project -> Add New Item -> Telerik Report [VERSION] Wizard. And the Prject Data Source is available in the Visual Studio Toolbox, if you open a report in the Visual Studio Report Designer.

Reuse data source components across reports in the Standalone Report Designer

The Standalone Report Designer can load data from external assemblies, which excludes custom data source components. For more details, check Extending Report Designer.

Instead, you can create templates with initial settings like configured data source components and layout elements - Report Templates.

See Also