InetSoft Product Information: Web Report Interface API

InetSoft products are shipped with an enhanced template designer, which includes functionality for creating interactive forms.

Reports are viewed using the standard Letter size (8.5x11 inches) in portrait orientation. If a different size is used, this must be specified by the replet when the report is generated.

A servlet instance can be accessed using the ServletRepository class when a replet intended to be run only in Web environments needs to access the servlet environment, such as the servlet context or configuration parameters.

The replet API covered so far is used to create replets regardless of the presentation client. Configuration options are available to slightly modify the appearance of the Web interface. For example, header and footer messages can be added to the repository window. Launching of hyperlinks can use frame-based HTML or new browser windows.

By selecting the 'Presentation' and 'DHTML' node from the navigation tree in the Enterprise Manager we can administer the DHTML presentation properties.

In some rare situations, a replet intended to be run only in Web environments needs to access the servlet environment, such as the servlet context or configuration parameters. A servlet instance can be accessed using the ServletRepository class:

#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index Read More

Servlet servlet = ServletRepository.getServlet();
 ServletConfig config = servlet.getServletConfig();
 ServletContext context = config.getServletContext(); 

There are several disadvantages of accessing the servlet in a replet class:

• If a replet accesses the servlet instance, it can only be used in a Web environment.

• The repository must be run locally in the servlet. It is impossible to use a remote repository server using either RMI or CORBA.

HTTP Request and Response

When a replet is running inside a servlet, the HTTP request and response objects are accessible as special parameters in the replet request. They can be retrieved from the HTTP_SERVICE_REQUEST and HTTP_SERVICE_RESPONSE using the RepletRequest constants defined in RepletRequest.

// param is the RepletRequest object passed to
// createReport()
HttpServiceRequest srvreq = (HttpServiceRequest)
param.getParameter(RepletRequest.SERVICE_REQUEST);
HttpServletRequest srvreq.getRequest();
 
HttpServiceResponse srvres = (HttpServiceResponse)
param.getParameter(RepletRequest.SERVICE_RESPONSE);
HttpServletResponse resp = srvres.getResponse();

Like the servlet instance, these parameters are not accessible if the replet is not running inside a servlet. The ability to access the HTTP request object is designed only to satisfy some special needs in the Web environment, such as access to the session object. It should not be used to access the report parameters, which are available through the HttpServiceRequest object and are portable across different server and client setup.

Customized Error Page

If there is a need for a customized version of the replet error page, it can be implemented by editing repletError.html, the screen that appears when a replet fails to be created for some standard reason.

Previous: Custom Report Repository Protocol