A label in a page report that is created using query resources or in a library component can be bound with web actions. This allows you to customize a label to make it respond to interactive events, and execute corresponding actions such as sorting and filtering. For example, you can insert a label in JReport Designer and associate an action with the label's onclick event. Then at runtime when end users run the report and click the label, the defined operation will be executed.
The following table lists the events that can be used to trigger web actions:
| Events | Description |
|---|---|
| Blur | Fires when the object loses the input focus. |
| Data Change | Fires when the contents of the object or selection have changed. |
| Click | Fires when the user clicks the left mouse button on the object. |
| onContextMenu | Fires when the user clicks the right mouse button on the object, opening the shortcut menu. |
| Double_Click | Fires when the user double-clicks the object. |
| Focus | Fires when the object receives focus. |
| Key Down | Fires when the user presses a key. |
| Key Press | Fires when the user presses an alphanumeric key. |
| Key Up | Fires when the user releases a key. |
| Mouse Down | Fires when the user clicks the object with either mouse button. |
| Mouse Move | Fires when the user moves the mouse over the object. |
| Mouse Out | Fires when the user moves the mouse pointer outside the boundaries of the object. |
| Mouse Over | Fires when the user moves the mouse pointer into the object. |
| Mouse Up | Fires when the user releases a mouse button while the mouse is over the object. |
| Resize | Fires when the size of the object is about to change. |
| Scroll | Fires when the user repositions the scroll box in the scrollbar on the object. |
| Select | Fires when the current selection changes. |
To bind web actions to a label:
that appears in the text box.
in the Display Type dialog and repeat the above steps to add more web actions. If a web action is not required, click
to remove it.
or
. Then, when an event that has been bound with more than one action happens, the upper action will be triggered first.Then, at runtime, when any of the specified events occurs on the label, the web action defined on the event will be triggered.
Notes:
<designer_install_root>\lib\html\javascript\dhtml and the same-name file located at <server_install_root>\public_html\dhtmljsp\js.The Filter web action enables you to filter the records in a data component.
To apply the Filter web action:

to add a new filter condition.
To delete a filter condition, select it and click
. To adjust the order of the filter conditions, click
or
.
At runtime, when the specified event occurs on the label, the selected data component will be filtered based on the predefined conditions.
The Sort web action enables you to sort the records in a data component.
To apply the Sort web action:

to add a new sort condition.
To delete a sort condition, select it and click
. To adjust the order of the sort conditions, click
or
.
At runtime, when the specified event occurs on the label, the selected data component will be sorted based on the predefined conditions.
The Parameter web action enables you to run a report, especially a report with parameters.
To apply the Parameter web action:

At runtime, when the specified event occurs on the label, the selected report will run using the specified parameter values.
With the Customized Control web action, you can customize dialogs to perform web actions such as sorting and filtering in tables in page reports that are creating using query resources. For the usage of this web action, see Using Customized Controls in a Table.
The Property web action enables you to make the properties of an object change at runtime, however, it is available to the following objects in library components only: fields and labels in tables/crosstabs, some chart elements such as legend, chart axis and so on, markers and areas in geographic maps, as well as labels, parameter controls and the Submit buttons of parameter form controls which are not in the library components' configuration panels.
To apply the Property web action:

to add a new line to change a property.
To delete a property line, click
. To adjust the order of the properties, click
or
.
At runtime, when the specified event occurs on the label, the property values will be applied to the selected object.
The Send Message web action enables you to send out a message when a specific event occurs on an object in a library component. The message will apply to any library components that are receiving the message when displayed in the same dashboard. For more information about this web action, refer to Sending Out Messages.