A FlexReport definition can include multiple data sources, accessible via the C1FlexReport.DataSources collection. Each data source in this collection is identified by a unique name and can be used as follows:
Main data source | It is the main data source for a report. The main data source is specified by using DataSourceName property of C1FlexReport class on the report. If the main data source is not specified (DataSourceName is empty or contains a name not found in the DataSources collection), C1FlexReport is rendered in the unbound mode, containing a single instance of the Detail section. |
Parameter data source | It is the source of valid values for the report parameters (elements in the C1FlexReport.Parameters collection). The data source for parameters is specified using ReportParameter.AllowedValuesDefinition.Binding.DataSourceName property. |
Chart data source | It is the data source for the Chart field. The data source for charts is specified using DataSource property of ChartField class. |
The list of supported data-source types in FlexReport are as follows:
To maintain compatibility with the legacy C1Report, C1FlexReport includes a DataSource property that references DataSources[DataSourceName]. Upon creating a new C1FlexReport, a single element named 'Main' is automatically added to its C1FlexReport.DataSources collection, and 'Main' is assigned to the C1FlexReport.DataSourceName property.Note that in C1Report, Main data source is the only data source for the report.