Reporting

Understanding the report life cycle, what happens and when it happens is crucial to effectively using Telerik Reporting.

  • The diagram shown below describes the sequence of stages from designer to completed document.

  • The section "Report Lifecycle Overview" below provides further detail on the activities that occur at each stage of the report lifecycle.

  • The section "Report Processing Flow" explains what report sections may contain - data items, data bound fields, aggregates and global objects.

  • The section "Report Rendering Flow" explains what page sections may contain.

Report Lifecycle Overview

  1. The report is designed in a Report Designer. The act of designing the report produces a report class (Visual Studio designer) or XML file (Standalone designer) that embody the Report Definition.

  2. The report is processed:

    • Performs all grouping, sorting and filtering calculations.

    • Evaluates all Expressions except page header and footer section items.

    • Binds the Report Definition and nested Data Items with data from the available data sources.

    • Triggers item Binding event, item Bindings and item Bound events.

    • Produces a Processing Report. The Processing Report is cached so it can be used for print and export operations.

  3. The report is rendered:

    • The Processing Report is passed to a specific rendering extension (e.g. MHTML or PDF output formats).

    • The Processing Report is paged if the output format supports paging.

    • Item expressions are evaluated in the page header and footer sections for every page.

    • The report is rendered to the Output Document.

Report Processing Flow

There are many ramifications of the report lifecycle including when you can use bound data fields, aggregates and page information functions across the Data Items.

  • Report Header and Footer sections: Item binding expressions should use only aggregate functions. If an expression specifies a data field without an aggregate, the First() aggregate function is used by default. The First() function returns the first record of the data source for the specified field.

  • Detail Section: The detail section item binding expressions can contain data bound fields, Expression Functions and Global Objects except PageCount and PageNumber.

  • Report Group sections: Item binding expressions should only use Aggregate Functions. If an expression specifies a data field without an aggregate, the First() aggregate function is used by default. The First() function returns the first record of the group data members for the specified field.

  • The processing stages of a report apply to Data Items (Table, CrossTab, List, Chart, SubReport) nested inside report sections as well, meaning all operations performed on a processing report are performed to all Data Items in report sections.

Report Rendering Flow

Page Header and Footer sections: Item binding expressions cannot use data fields or aggregate functions. Paging is specific to rendering format and must occur during rendering, well after early report processing where data binding occurs. PageNumber and PageCount global objects are available only in this section.