Built-in Interactivity for Dashboards & Reports

The Designer provides the embedded Script implementation of all the methods discussed in this section. It is better to use the Designer to specify links and interactions, only using the API described below if the desired feature cannot be implemented from the visual interface.

The BasicReplet API defines a number of methods for adding common user interactions to a replet. Each call to these methods causes some default event handlers to be registered in order to support that interaction.

They serve as convenience functions as well as high-level encapsulations of the functionality. For most replets, the high-level methods are enough to handle most user interaction needs and programmers do not need to work with the lower level event handling API.

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

addLink()

There are three varieties of this method for adding a link to another element or report:

1. addLink(String eid, String replet) Add a hyperlink from the specified element (element ID) to a replet. When the element is clicked, the target replet is opened in a new win­dow.

2. addLink(String eid, EventPoint item, String replet, RepletRequest req)

Add a hyperlink from a data item in the specified element to a replet. The data item is identified by the element ID (String eid), and by the location of the item in an EventPoint object. The point can identify either a table cell or a chart data point. In the case of table cells, EventPoint.x is the column number and EventPoint.y is the row number. Row and column numbers can also be obtained by item.getrow() and item.getcolumn(). In the case of chart data points, EventPoint.x is the index in a dataset and EventPoint.y is the dataset index. If either of the item positions (x and y) is to be ignored, set the respective value to -1. For example, if the link should be active for the entire first column, use EventPoint(0, -1) as the item value.

3. addLink(String eid, EventPoint item, String toeid, int row) Add a hyperlink from an element or an element item to another ele­ment in the same report. If the link is on an element, the item should be a null value. An optional row number can be specified if the target element is a table.

view gallery
View live interactive examples in InetSoft's dashboard and visualization gallery.

addLinkURL(String eid, EventPoint item, String url, String target)

Add a hyperlink from an element or an element item to a URL. The URL is displayed in the named frame, or in the current browser window if the target is null.

addRequest(String eid, EventPoint item, RepletRequest req)

Add a request link to the element/item (item could be null). When the element/item is clicked, the request is sent to the replet as a RequestEvent.

addStatus(String eid, EventPoint item, String msg)

Associate a status message with an element or an element item (item could be null). The message will be displayed when the mouse moves into the specified element or item.

addPopupMenu()

There are two varieties of this method of adding a popup menu:

1. addPopupMenu(String[] items)

Add a page level popup menu. The popup menu is activated when a right mouse click occurs anywhere on the page.

2. addPopupMenu(String eid, EventPoint item, String[] items)

Add an element popup menu. The popup menu is activated when a right mouse click occurs in the specified element/item (item could be null).

addMenuAction()

There are two varieties of this method, corresponding to the two addPopupMenu() methods. RepletCommand is covered in detail later.

1. addMenuAction(String menuitem, RepletCommand action)

Specify the command to execute when a menu item is selected.

2. addMenuAction(String eid, EventPoint item, String menuitem, RepletCommand action)

Specify the command to execute when an element menu item is selected. addFormLink(String form, String replet) Forward a form request to another replet. Form handling is covered in detail later.

Note that addLink() and addLinkURL() are memory intensive functions. Hence, it is highly recommended that these functions not be used, and instead, hyperlinks are added through the Designer. Right click on the report element (Table, Section, Chart or Text) and select the 'Hyperlink' option. You can specify the hyperlink to be a web link or a report link.

More Articles About Dashboard Reports

About Report Event Handling - The distributed event model is the foundation for user/replet interaction. All interactions are built on top of the event layer, including all built-in interactions and parameterization support. A major feature of this event model is its client platform independence. Report developers use the same event handling API on the server regardless of the choice of the client. Because of the distributed nature of the event model, the event handling process relies exclusively on passing objects between the client and the event handler. When an event is triggered, it is handed over to the event handler...

Handling of Query Parameters - Report queries may require parameters. Parameters are defined in queries to retrieve user input at runtime. In addition to the parameters defined in the queries, data sources used by queries may also require parameters to establish connections to the source. For example, an RDBMS data source may require a user ID and password to login to a database. Query parameters are handled in the same way as replet parameters. A list of all variables used in queries in a template is returned as the replet parameter. All integral parameters are mapped to a simple replet parameter with an integer constraint and all real number parameters are mapped to a simple replet parameter with a double value constraint...

Near Miss Reporting KPIs - Near Miss Rate: Frequency of near misses may be a sign of impending dangers. Monitoring the near miss rate KPI helps to avoid future occurrences and offers information into how effectively safety procedures are doing. Reporting Lag Time: It is important to note how long it takes an employee to report a near miss. A more proactive safety culture is indicated by a shorter lag time. Keeping an eye on this KPI guarantees that any risks are dealt with quickly...

Occupational Health Surveys - Through questionnaires, interviews, and medical exams, information on the health and well-being of employees is gathered for occupational health surveys. Industrial hygienists may better understand the frequency of work-related diseases, injuries, and other health issues among workers by using these questionnaires. Understanding the general health of the workforce and assisting in the prioritization of treatments and preventative actions are two benefits of analyzing the survey data...

Warehouse Putaway KPI - Proper storing techniques are very important in every warehouse. If you don't manage it, the efficiency of the warehouse will be drastically affected. The cost will also increase a lot and you cannot control it. So, the inventory you receive must be stored appropriately, and measuring its performance is done by the Putaway KPI. The important KPIs in putaway are: Accuracy - This indicator is used to determine the proportion of items putaway properly after they have been received at the warehouse. It is calculated by dividing the number of inventories stored correctly by the total number of inventories putaway...

Previous: Customizable Reports
We will help you get started Contact us