Telerik 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 "Why Report Lifecycle is Important" explains what report sections may contain - data bound fields, aggregates and global objects.

Report Lifecycle Overview

  1. The report is designed in the Visual Studio Report Designer. The act of designing the report produces a report class that embodies the Report Definition.

  2. The report is processed:

    • Binds the Report Definition with data from the report data source.

    • Performs all grouping, sorting and filtering calculations.

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

    • Fires item Binding and Bound events.

    • Produces a Report Instance. Report instances may be stored and rendered at a later time.

  3. The report is rendered:

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

    • The report instance 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.

Why Report Lifecycle is Important

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

  • Page Headers and Footers: 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.

  • Report Headers and Footers: 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.

  • Grouping: 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 data source for the specified field.