InetSoft Reporting Software: Report API Commands

Replet commands are objects that contain information on how to perform certain actions in a viewer. The RepletCommand class is a composite class. This means each RepletCommand object can be a single command, or is composed of multiple sub-command objects. A single command can be created with one of the static factory methods:



 RepletCommand cmd =
 RepletCommand.showReplet("Sales/2nd Quarter"); 

More commands can be added to a created command:

 RepletCommand cmd = new RepletCommand();
 cmd.addShowReplet("Sales/2nd Quarter");
 cmd.addShowReplet("Sales/Analysis"); 

Each command factory method (which creates a single command object) has a corresponding method for adding the same command to an existing command object.

Geographic Analysis

RepletCommand factory methods

Factory Method

Description

RepletCommand.showReplet()

Creates a command that instructs the viewer to open a new replet. An optional request object can be specified as the creation parameters.

RepletCommand.showURL()

Creates a command that instructs the viewer to show a URL in a web browser. An optional target frame name can be specified. If the target is not specified, the current frame is used.

RepletCommand.showMenu()

Creates a command that instructs the viewer to pop up a menu. If no location is specified, the menu is placed at the last mouse-click location.

RepletCommand.setCursor()

Causes the viewer to change the cursor. This command is ignored in the Web Viewer.

RepletComand.promptParameters()

Launches a request dialog to prompt users for parameter values. The specified request name must be declared in the replet.

RepletCommand.sendRequest()

Sends a request to a replet. The request is placed in a RequestEvent and forwarded to the event handling process.

RepletCommand.refresh()

Refreshes the contents of the report in the viewer.

RepletCommand.scrollTo()

Scrolls the viewer window to the specified location.

RepletCommand.showStatus()

Displays status message in the status bar.

Some of the commands may cause an event to be generated. When a menu item is selected on the menu popped up by showMenu(), a RepletMenuEvent is generated. When a request dialog is submitted, a RequestEvent is generated.