Programming Reports

This section discusses various aspects of report programming. It covers the following topics:

Note: The examples in this chapter are found in the examples\docExamples\core directory.

  • Concepts of template-based reporting, data binding, and execution.
  • The API behind the table report element, the most frequently used element in business reports.
  • Grouping and ranking in tables.
  • Issues related to internationalization, and the use of locale mapping files.
  • Importing and exporting to supported report file formats.
#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

Template-based Reporting

A report template is a skeleton report. It is represented internally in XML format as an SRT file and can be generated with the Report Designer. For more details on the use of the Designer, refer to the Report Designer. This chapter covers the use of a report template from a programmatic point of view.

Using a report template involves the following steps:

  • Create a report template with the Report Designer.
  • Save the template as a file.
  • Create a ReportSheet from the saved template file.
  • Supply data for the report elements in the ReportSheet.
  • Export the report to one of the many supported export formats.

Report Template Concepts

A report template is a report without the dynamically retrieved data. A template can contain text, tables, charts, images, etc. It does not contain any runtime data, such as a user defined painter classes, components and table lens objects linked to external data sources.

Its main purpose is to capture the statically defined report attributes and, optionally, the data queries used at runtime to retrieve the report data. It helps to simplify the programming required to generate a report. Since a report template is normally created with the visual Report Designer, it involves no programming effort. By taking advantage of report templates, reports do not need to be created entirely by a program at runtime. Instead, the static part of a report can be captured and stored in a separate template file. If data is supplied from a data source not supported in the Data Modeler, then the program that uses it only needs to supply the dynamic data used inside the template.

If a report template is used, is there any need to write code to set up and change report attributes? In most situations there should be almost no need to write code to develop sophisticated business reports. However, the Designer may prove inadequate when advanced data processing logic, or data from an unsupported data source, is required to generate a report. In this situation (although extremely rare) it may be necessary to use the reporting API. It is therefore necessary to understand the API and how each property works. The visual design environment provides a convenient way to set up a report and its elements, but in certain circumstances a thorough understanding of InetSoft's concepts and its API is required.

supply chain kpi report example
facilities maintenance report example
ML report example