Report Structure
Telerik Reporting is an embedded engine, thus available and accessible directly within your application.
Telerik Reports are standard .NET classes and you can add a report to a project and handle it in the Visual Studio IDE in
a similar manner to what you're already used to.
A Telerik Report is represented by an instance of the Report class
and each report serves as a container for sections. In the same way every section serves as a container for report items.
The design of a report is divided into sections and you can open your report in Report Designer
to see its sections. To create useful reports, you need to understand how each section works. For example, the section in
which you choose to place a data bound items determines how Telerik Reporting calculates the results.
Report sections divide the report vertically. Depending on their type they appear on specific places in the report
document and the report items they contain are processed and rendered differently. For more information see Understanding Report Sections
A report can be either data bound or unbound. To create a bound report you should first bind the report or a nested Data Items
to a data source, and then specify Expressions for report items within the report or data item.
To learn more about creating a bound report,
see the Connecting to Data and Using Expressions sections.
After a report is constructed, it is possible to save it to XML file and re-use it later (for more information, see Serializing Report Definition in XML).
Also, if a report uses stylesheets, they can be saved to xml file and shared between multiple reports in your application
(for more information, see Exporting and Reusing Style Sheets ).
Report Sections
Telerik Report consists of a number of sections, each of a different type. Every section may contain report items.
A report section represents a specific area on a report page, used to define how to render report items that belong to it. Every section is
an instance of the ReportSectionBase class.
The Height property defines the space that a section occupies on a page. Other specific properties such as PrintOnFirstPage
and PrintOnLastPage define a section's behavior.
When a new Telerik Report is added to a project, it is initially divided into three sections - PageHeader, Detail
and PageFooter. A section type specifies how the items located on this section are rendered, their rendering order and
how many times they are rendered if report is data bound.
Report Items
Report items are inserted into a report depending on what you need e.g. TextBox
item for static or data bound text, PictureBox for displaying images,
Barcode for showing barcode in your label report etc. Every report
item is an instance of the ReportItemBase class.
Report items can reside either inside report sections or inside other report items that may serve as item containers (e.g. Panel or
Table/Crosstab/List items).
The appearance and behavior of a report item is defined by its type. See Understanding Report Items section
for more info about different report item types available in the current version of Telerik Reporting.
Controlling Height
To remove blank vertical space in a container (report section or panel item), whenever you control the visibility of report items in runtime,
set its respective height to a very small value (e.g. 1mm). Section/Panel item can grow to accommodate their children but cannot shrink/take space that is
no longer occupied. If you want a section/panel to shrink only at runtime you can set its Height property in the report constructor.
Place the Height property assignment code just after the IntializeComponent() method call.
See Also