Reports

Top  Previous  Next

Reports are designed to display data in a graphic, printer-friendly format.

In most cases, reports are created by users similarly to alerts, queries and other system objects. However, some reports are pre-configured in the system distribution and can't be changed by the user. These reports are built into the the AggreGate distribution package and extension plugins.

note_further-wt

Every user has his own set of Reports.

Every used-defined report is characterized by two important properties:

Report Template that defines generic look and feel and layout of the report
Source Data Expression that is used to fetch data for filling in report template

Source Data Expression

The Source Data Expression is an AggreGate Expression that is evaluated every time when report is run and shown to the user. This expression must evaluate to a Data Table. An error condition will occur if this expression evaluates to any primitive type, such as Boolean, Integer or String. Data from the Data Table produced as result of the expression is used to fill in the report template and prepare the report.

This expression may not contain any relative references to the default context, default Data Table etc. In most cases, it will contain a single reference to some server variable or function. When the expression is evaluated, this reference is resolved to a Data Table containing the value of a variable or the output of a function.

note_example-wt

Example: If a report is designed to show data retrieved by a query, its Source Data Expression should contain a reference to the data variable defined in the query context. So if query is called ds_traffic_stats and belongs to the admin user (this actually exists as a pre-defined query), we can get the following Source Data Expression:

{users.admin.queries.ds_traffic_stats:data}

Report Template

A Report Template defines page layout and different transformations that are applied to the source data when report is run. The report template is defined in XML, and stored as a property of the report. The Report Template is automatically generated during report creation. This auto-generated template is based on the data that fetched by the Source Data Expression. There are two ways to modify the template of an existing report:

Directly in XML format, using the Configure Report action of a report context.
Using the Report Editor. This can be done by executing Edit Report Template action of a report context.

Reports are compiled, filled and processed by the JasperReports engine. You can refer to Jasper Reports documentation for more information on template structure, available elements and their properties.

Viewing Reports

A reports is accessed using its Show Report context action. This action asks for parameters, fills the report template with data retrieved from various contexts and presents the user with a prepared report:

cl_report_viewer

A report may be printed or exported to a file. See the Show Report UI Procedure for details.

Administering Reports

Two contexts are used to administer reports: One is the general Reports context, which serves as a container. The other is the Report context, which holds the information for one report.

note_further-wt

Pre-defined reports may not have all settings and actions that are available for custom user-created reports.

ls_reports

Report Configuration

Every report has several properties:

Field Description

Field Name

Name. Name of the report context, used to refer to it from other parts of the system. Should satisfy context naming conventions. Cannot be changed once the report is created.

name

Description. Textual description of the report. This is also a description of the Report context.

description

Source Data Expression. Expression used to fetch data for populating the report template.

expression

Report Template. The report template, in XML format.

template

These properties may be accessed through the childInfo variable.

Built-In Report

The basic LinkServer distribution contains just a single built-in report, called User Accounts. It contains information about all LinkServer user accounts accessible by the user who is viewing the report:

ls_reports_users