Data Items Overview
The data items display and manipulate data in Telerik Reports. With a data item, you can group, sort, filter, and aggregate data from a single data source. Telerik Reporting provides several types of data items: Report, SubReport, Table, Crosstab, List, Graph, Map, and Gauge. The Table, Crosstab, and List data items are templates based on the Table data item, and they can be combined in unique ways to customize the data presentation. Charts provide a graphical view of data and aggregates. The type of data item you choose depends on your data: the amount of data, the range in data values, and what you want to convey in your report.
Starting with R3 2019 (13.2.19.918), when two or more data items use the same DataSource component, the raw data is reused between them. For example, if a Table and a Graph use the same SqlDataSource, the data will be fetched just once from the database when rendering the report.
The data item changes the data context. This means that the ReportItem.DataObject
Global Object received from the parent is no longer equivalent to the Fields
Global Object. This makes the data items special for the Expressions context applied to the data report item's Properties.
For example, in the Bindings and Conditional Formattings, the Fields
Global Object refers to the parent data scope, whereas in the Filterings, Groupings, and Sortings, the Fields
refers to the scope of the current data item. This lets you use both scopes in the Expressions in these properties. For example, when you want to filter the child data only for a particular parent value, you may use a Filtering Rule like =ReportItem.DataObject.PrentFieldName = =Fields.ChildFieldName
.
To make the best choice of data item to use for displaying report data, it helps to understand the characteristics of your data and the purpose of the report. The following list describes the features of each data region:
- Report The Report item consists of multiple horizontal sections (bands), one for each part of the report. For example, data and text in the report header section are rendered at the beginning of the report, data and text in the page header section are rendered at the beginning of each page, and data and text in the page footer sections are rendered at the end of each page. In the middle of the report are the report groups and the detail section. The report groups are always nested and display data for each value in the group, which is determined at runtime. The detail section displays at run-time one row for each detail item in the report data source.
- SubReport The SubReport item is a placeholder for another report you would like to integrate into the current one. Its structure is the same as the Report item except for the Page sections and PageSettings which are ignored. Starting with R3 2022 SP1 16.2.22.1109 the SubReport item has its own DataSource property that lets you pass data from the main report easily.
- Table The Table item has a fixed number of columns and displays detailed or grouped data by rows. The Table expands down the page as needed. You can display all the detailed data, row by row, or group the data by creating row groups. Row groups can be nested or adjacent. Each row group displays a dynamic row down the page for each value in the group, which is determined at run-time. You can also add static rows for labels or totals. You can add totals to the table or to a specific group.
- Crosstab The Crosstab item is derived from the Table item and displays data grouped by rows and columns. A Crosstab has at least one row group and one column group. The Crosstab expands across the page for column groups and down the page for row groups. The Crosstab cells display summary and aggregate values scoped to the intersections of the row and column groups. You can create additional nested groups and adjacent groups. The number of rows and columns in a Crosstab depends on the values for each group, determined at run-time. You can also add static rows for labels or totals. You can add totals to the table or to a specific group.
- List The List item is derived from the Table item and contains one row that repeats for each value in the data source and displays data in a free-form format. For example, you might use a list to design a form or display both a table and a chart. Arrange text boxes anywhere in the list to create your layout.
- Graph The Graph item enables you to present large volumes of aggregated information at a glance in a visual format.
- Map The Map item enables you to represent geospatial-related data on top of the world map.
- Gauge The Gauge report item enables the display of key performance indicators (KPIs) that track the amount of progress made towards achieving the targets or goals.