Using the API for Report Refreshing
InetSoft's reporting software includes an API for programmatic control of report generation. In dynamic business environments, where data changes frequently, having an up-to-date report is crucial for informed decision-making.
Programmatically refreshing a report ensures that the latest information is reflected, maintaining the accuracy and relevance of insights. This automation not only saves time that would otherwise be spent manually updating reports but also enhances the efficiency of data-driven processes. Moreover, it facilitates seamless integration with other systems or applications, fostering a cohesive and interconnected data ecosystem.
#1 Ranking: Read how InetSoft was rated #1 for user adoption in G2's user survey-based index |
|
Read More |
The createReport() method is called whenever a request to generate a report is received in the repository. If a replet needs to change the report contents within an event handling code, it needs to inform the repository to refresh the report.
addRepletSelectionListener("refresh", null,
new RepletSelectionListener() {
public RepletCommand valueChanged(SelectionEvent e) {
// change report contents
...
regenerate(); // refresh the report object
return RepletCommand.refresh();
}
});
The regenerate() call causes the repository to call the createReport() method with the last RepletRequest. If the createReport() has never been called before, it passes an empty request. The createReport() should return the new report object.
If a refresh() command is issued without a call to regenerate(), the web viewer will reload all pages from the repository. However, since the repository caches the report object internally, it will still return the original contents.
The reprint() command is similar to refresh() except that the report is reused to generate output, without re-executing the queries in the report.
The regenerate() call is only necessary if the replet initiates the refresh itself. All repository-initiated requests automatically refresh the internal cache.
Replet API
The core replet API is defined in the Replet interface. It consists of methods to: