If you want the dashboard users to make use of the configuration panel at runtime, you need to configure the panel for each library component in JReport Designer. You can insert labels and web controls such as text fields, checkboxes, drop-down lists, and lists into the configuration panel to filter or sort a library component, or change properties of objects in a library component. When a library component contains parameters, values of the parameters can also be specified via the configuration panel.
To display the configuration panel, check the Display Configuration Panel checkbox on the top-right corner of the design area. The initial configuration panel contains a title bar, a checkbox and two buttons.
The title bar contains the title of the library component and a button . You can use the button to show or hide the panel when the library component is in view mode as a dashboard component or inserted into a dashboard. The checkbox is used to specify whether to show the panel by default when the library component is inserted into a dashboard in JDashboard. You can check the checkbox by setting a property of the configuration panel Default Show to true in the Report Inspector.
All actions in this panel will be bound with the OK and Cancel buttons in it. You can click OK to apply the actions to the library component. The button Cancel is used to make this panel invisible and initialize the value of the web controls to the last values.
The height of the panel can be adjusted to the size of the content, but its width is equal to the width of the library component and cannot be adjusted. You can resize its width only by resizing the width of the library component. The two buttons are built-in buttons that cannot be deleted, cut, copied, or pasted, but their properties can be edited in the Report Inspector and they can be moved by dragging and dropping. Other components in the panel can be deleted.
When a library component contains parameters, the configuration panel will be automatically populated with all the parameters needed to run the library component, and web controls for the parameters will be created automatically in this panel. Therefore, this panel can be used to specify parameter values for the library component at runtime.
When the library component is published to JReport Server and inserted into a dashboard using JDashboard, the values of the parameters saved in the library component will be used as the default values. If JDashboard users want to change the parameter values, they can make use of the configuration panel published with the library component. After specifying new values in the configuration panel and clicking OK, the specified parameter values will be used to populate the data. The changed values will be saved in the dashboard and take effect when the dashboard is opened next time.
You can insert web controls which are used as variables into the configuration panel, and apply web behaviors to the web controls to perform specific actions at runtime.
The web controls that can be inserted into the configuration panel of a library component are: text field, checkbox, drop-down list, and list.
To insert a text field into the configuration panel and define its web options:
Do one of the following to insert the text field:
Standard means that the text field will be a normal text field. Password means that the text field will be a password box in which the typed characters will be displayed as asterisks.
To insert a checkbox into the configuration panel and define its web options:
Do one of the following to insert the checkbox:
To insert a list/drop-down list into the configuration panel and define its web options:
Do one of the following to insert the list/drop-down list:
If you want to use a DBField/formula field/parameter field to control the value, click in the Value column to insert one with the Insert Fields dialog, and then select the format for the inserted field from the drop-down list in the Item Label column. Check the All radio button in the Insert Field dialog if you want to add an All value to the list/drop-down list. Then when All is selected as value of the list/drop-down list at runtime, all filter actions defined on the list/drop-down list will not take effect, and if you applied some other web action that needs value from the list/drop-down list, a Null value will be returned.
Note: If you have specified a tooltip for any web control, when the library component is opened in JDashboard, the tooltip of the web control will be displayed differently on different browsers:
You can apply web behaviors, including Filter, Sort and Change Property, to the web controls you insert in the configuration panel of a library component so as to filter or sort the records in the table, chart or crosstab of the library component or change the properties of an object in the library component at runtime.
To bind the Filter web behavior to a web control:
Then at runtime, when end users specify a value for the web control and click OK in the configuration panel, the records in the data component will be filtered.
To bind the Sort web behavior to a web control:
To delete a sort condition, click . To adjust the order of the sort conditions, click
or
.
Then at runtime, when end users specify a value for the web control and click OK in the configuration panel, the records in the data component will be sorted.
To bind the Change Property web behavior to a web control:
To delete a property line, click . To adjust the order of the properties, click
or
.
Then at runtime, when end users specify a value for the web control and click OK in the configuration panel, the properties of the specified object in the library component will be changed.