New to Telerik Reporting? Download free 30-day trial

Working With Data at Design Time

The Visual Studio Report Designer would show data source related information (incl. data source schema) when a valid data source is available at design time. As the Report Designer works inside Visual Studio, a valid data source means:

  • A data source object that is instantiated and initialized in the InitializeComponent() method of the designed object class - this is the only part of the class that Visual Studio designer respects.
  • The data source object should be operational at design time. This means that Visual Studio (through the Visual Studio Report Designer

With the above in mind, there are two cases:

Data sources available at design time

The Data Source Components designed and developed specifically for Telerik Reports, overcome most of the design time issues while providing the freedom to connect Data Items to a wide variety of data sources incl. databases, OR/mappers, Analysis Services' Cubes, etc. without requiring code. Data source components can only read the data and cannot modify it. Every data source component is an instance of the DataSource class. Having valid data source attached to Data Source Components at design time allows you to take advantage of all design time goodness and work with the Data Explorer. For more information please see Data Source Components and DataSource Wizard.

Data source available only at runtime

This approach is useful when you cannot get the report's data source at design time or want to avoid loading real data into Visual Studio at design time. In this case you would have to mock your data just to enable the Report Designer to show any data schema. This will enable you to adjust the layout of the report and bind report items to the available data fields, while the real data will be loaded only at runtime either in NeedDataSource event or in the actual application.

See Also

In this article