How to Create an Executable Report

Replet Names

Replets are organized in a hierarchical structure in the repository. There can be any number of levels in the tree. The leaf nodes of the tree are replets and non-leaf nodes are folders. A non-leaf node can be empty, in which case it is simply an empty folder (with no reports in it).

The tree position of a replet is encoded in the replet name. A replet name is a full path from the root of the tree to the replet leaf node. Each node is separated by a slash '/'. For example, the replet 'Replet2' in a top-level folder, 'Sales', would have the name 'Sales/Replet2'. Whenever a replet is referenced in a Java program or as a URL, the full name must be used. Because the entire tree structure is encoded in the replet full name, changing the name of a replet could have the effect of moving it among the branches of the tree.

Although the name of the replet resembles a file path, it has no relationship to the location of the file on the file system. Neither does it have any relationship to the package a replet belongs to. A replet class is loaded as a regular Java class. As long as the class is accessible from the CLASSPATH, it does not have to be placed in any particular directory structure.

Create an Executable Report

A Simple Executable Report

As shown earlier, creating a simple replet basically involves constructing a ReportSheet object.

public class Replet1 extends BasicReplet {
   ReportSheet createReport(RepletRequest req) {
      ... // create and return a ReportSheet object
   }
}

For a simple reporting system where no user interaction with the reports is needed, the creation of a ReportSheet object may be the only thing the programmer needs to do. Therefore, there is no need to use the Replet API, rather than the basic InetSoft API, to create ReportSheet objects. The following is a list of features you automatically get, using the basic InetSoft API, with no extra coding:

• Server based report generation with thin client.

• Web-based report viewing in any browser.

• Demand paging of reports from the server to the client.

• Ability to use the replet with other services, such as scheduling of reports.

• Built-in support for delivering the output through email.

• Built-in PDF generation in the Web Viewer, so your reports can be saved or printed from a browser with no client-side Java code.

You will probably find more features to add to this list as we more fully explore the replet architecture. 

Previous: Report Refreshing