Example of an Creating an Executable Report

We start our example by creating a static replet. To make running the examples easy, we do not use a database, but get data from a delimited data file.

  • We will use the template 'embeddedtable.srt' we created in the Report Creation With Grouping/Summarization section from the Sorting and Groupingchapter. This template contains a table with just the header row (meta-data) specified as embedded data, along with grouping, summarization and Top N filtering, but contains no actual data binding. The data is supplied during report construction in the replet.
  • #1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

    package inetsoft.demo.replets;
     
    import inetsoft.sree.*;
    import inetsoft.report.*;
    import inetsoft.report.io.*;
    import inetsoft.report.lens.*;
    import java.io.*;
    
    public class Replet1 extends BasicReplet {
    public void init(RepletRequest req) throws RepletException {
    try {
    // load the report template
    InputStream input = getClass().
    getResourceAsStream("embeddedtable.srt");
    
    Builder builder =
    Builder.getBuilder(Builder.TEMPLATE, input);
    report = (ReportSheet) builder.read(".");
    // load data from data file
    InputStream input2 =
    getClass().getResourceAsStream("data/" +
    "education.csv");
     
    ttl = new TextTableLens(input2,",");
    ttl.setHeaderRowCount(1);
    } catch(Exception e) {
    e.printStackTrace();
    throw new RepletException(e.getMessage());
    }
    }
    public ReportSheet createReport(RepletRequest req) {
    // set the data on the template
    report.setElement("Table1", ttl);
    return report;
    }
    ReportSheet report;
    TextTableLens ttl;
    }
    
  • After the replet is compiled, use the Enterprise Manager to register the replet. (See Registering Reports in the Administration Reference.)
    1. Start the Enterprise Manager and select the Report tab.
    2. Click the 'Repository' tree node, select the 'New Report' link at the bottom of the screen.
    3. Enter 'Replet1' in the 'Name' field, select 'Class' for 'Type', and enter 'inetsoft.demo.replets.Replet1' in the 'Path' field.
    4. Click 'Apply' to register the replet.
  • Test the registered replet by viewing it in the User Portal.
  • Using the Web Viewer to View the Report Replet

    To use the Web Viewer to view the replet, we need to deploy the servlet version of the repository in the application server of your choice. The deployment of a servlet may differ between different servlet engines.

    The Application Server needs to have a webapp with the appropriate InetSoft JARs, and a registered servlet.

    The init argument specifies the location of the configuration files. Usually the 'classes' directory of the webapp. The ServletRepository needs to be identified as follows:

    MAPPING Examples (the name used in the url)

    Class Name inetsoft.sree.web.ServletRepository

    Init Arguments sree.home=c:/Tomcat/webapps/sree/WEB-INF/classes

    The servlet and reports can be deployed directly from the Enterprise Manager in supported servers, or deployed manually following application server instructions.

    After the servlet is properly setup, we can start a browser and point it to our servlet, for example URL: http://localhost:8080/sree/Reports.

    When the URL is accessed, it shows a hierarchical view of the repository contents. Select a replet on the tree. The viewer window for that report comes up on the main window frame.

    The viewer window shows one page at a time. It has navigation buttons to move to other pages of a report. We cover the details of the Web Viewer in the End User chapter.

    More Articles About Reporting

    Availability and Uptime Metrics Service Uptime - The proportion of time a service is operational is measured by this KPI. It offers information on the service's dependability and accessibility...

    Consumer Goods Supply Chain KPIs - Perfect Order Rate: The percentage of orders that are delivered to the customer without any errors or issues. On-Time Delivery (OTD): The percentage of orders delivered on or before the promised delivery date. Order Fill Rate: The percentage of customer orders that are completely fulfilled in a single shipment. Inventory Turnover: The number of times inventory is sold or used up in a given period. This indicates how efficiently a company is...

    Customer Effort Score - A flawless client experience is critical. One of the most important KPIs on NPS dashboards is the Customer Effort Score (CES), which gauges how simple it is for consumers to complete activities. By combining CES and NPS, organizations may get a comprehensive understanding of the customer journey, which can improve customer satisfaction and optimize operations...

    Evaluate InetSoft's Maintenance Reporting Tool - Are you looking for a good maintenance reporting tool? InetSoft's pioneering reporting application creates great dashboards and reports for facilities maintenance with an easy-to-use drag-and-drop designer. View a demo and try interactive examples...

    Replacement for Hyperion Dashboard Reporting - Looking for a better dashboard reporting solution for your Hyperion system? InetSoft, a pioneer in self-service business intelligence, offers an easy to deploy business intelligence platform that will streamline your consolidation, reporting, and performance management functions. Whereas Hyperion is a sophisticated BI tool for business performance, InetSoft's Style Intelligence provides a different level of interactivity and dashboard appeal. While other vendors offer advanced tools for operational use only, our software provides easy access and usage to any and all users with intuitive...

    Top 20 Fundamental Reporting Practices, Examples & Templates - A clear illustration of what is entailed in management reporting and its functions have been discussed earlier in the post. Now it is necessary to discuss the fundamental practices of management reporting. The post will look at 20 important management reporting guidelines, while exploring different examples of management reports and taking into account how to use these guidelines in various kinds of management reports...

    Previous: How to Create an Executable Report