InetSoft Technology: Executing a Report Template

If data binding or scripting is specified in a report template, the queries and script must be processed before the template can be used to create the final executed report, which may further be previewed (using the Previewer) or exported to one of the many supported file formats. A manager class, XSessionManager, provides the API for managing all queries and script defined in a report template. A client front-end application can execute a report in one step:

ReportSheet report = …;
. . .
XSessionManager.getSessionManager().execute(report);
Previewer previewer = new Previewer();
previewer.print(report);
previewer.pack();
previewer.setVisible(true);

Executing a report by this method actually performs three steps:

• If any query in a report requires parameters, the execute() call prompts end users for the parameter values.

• All queries in a report are executed. If any parameters are collected in the first step, they are grouped according to the queries they belong to and passed to the query execution.

• The query results are bound to each report element that the query is associated with.

chart art

Exporting a Report Template

It is important to distinguish between a template and a report. A template is an XML document, which contains layout information for report elements. A report is the final output generated after running a report application. A template therefore only contains meta-information about a report. Exporting a template as a template will only save the meta-information and will not capture all report data.

To export a report template to one of the many supported formats, we can use the builder class:

 Builder builder = Builder.getBuilder(Builder.PDF,
 new FileOutputStream("pdfexp.pdf"));
 builder.write(report); 

Refer to the Import/Export Report File Formats section for a more detailed description of the report exporting API.

Summary of the Use of Report Templates

This chapter described the API that influences report templates created by the visual Designer. Report templates can be imported into a Java Program as ReportSheet objects. We also discussed template processing, which concerns binding data to an element on a template; and template execution, which executes scripts and queries bound to elements. Adding table styles, and all other formatting operations, should be performed at the template level using the Report Designer.

 

InetSoft Viewpoint

"The open standards aspect is very important to us since it allows our customers to integrate our technology more easily and leverage assets they already have, in terms of hardware and software and IT skills. So based on this BI platform, our software delivers a host of front-end BI tools including visualization tools, enterprise reporting, monitoring dashboards, and analysis. Those functions were based on a very powerful patent-pending technology we call Data Block.

This Data Block technology is really made up of a back-end data mashup engine and a caching middle layer. There is a front-end we call the worksheet, which is a Web-based, spreadsheet-like user interface that a power user can easily use to combine and transform data blocks. The data blocks are typically started at the atomic data block level. That is typically created by an IT or a BI specialist. They choose these data blocks and performance tune those data blocks.

Then the power users can use those building blocks to build more complex, but more useful structures for answering the questions they have on hand. And all the data blocks you build, in turn become building blocks themselves. You can build on this architecture, building very sophisticated structures which you can use to answer a wide range of unanticipatible questions. " - Luke Liang, CEO, InetSoft

 
Previous: Report Template-Based Programming