Working with custom fields
Custom fields are user defined fields which can be used as resource properties, the same as Type, Description, Last Modified, and so on.
After a custom field is created and enabled by administrators, it will be available in the resource information table on both the JReport Administration > Resources panel and the JReport Console > Resources page. End users can define its value by setting properties.
Creating and enabling custom fields
To create a custom field:
- On the JReport Administration page, click Configuration on the system toolbar, then select Custom Field from the drop-down menu.
- In the Custom Field panel, click New Custom Field on the task bar.
- In the New Custom Field dialog, provide a name and description for the custom field.
- To enable the custom field, check the Enabled option.
- Click OK to create the custom field.
Editing custom fields
To edit a custom field:
- In the Custom Field panel, select the row where the custom field is in, then click Edit > Properties on the task bar.
- In the displayed dialog, modify the name and description for the custom field, and change its status if required.
- Click OK to accept the changes.
Deleting custom fields
Administrators can delete the custom fields that are not required at any time. To do this:
- In the Custom Field panel, select the row where the custom field is. You can select multiple custom fields.
- Click Edit > Delete on the task bar.
- Click OK in the warning message to confirm the deletion.
Setting value to custom fields
When you publish resources to JReport Server, either locally/remotely or from JReport Designer, if there are custom fields enabled, they will be displayed in the publishing dialog and you can specify the value of the custom fields for each resource according to your requirements. Also, the custom field values can be defined by setting resource properties.
Hiding custom fields
By default, all the enabled custom fields will be displayed in the resource information table on both the JReport Administration > Resources panel and the JReport Console > Resources page. If you want to hide a custom field from being shown in this table, follow the steps below:
For administrators:
- Click Profile on the system toolbar of the JReport Administration page, then select Customize Server Preferences from the drop-down menu.
- In the General tab, in the Columns Shown in Resources List section, unselect the checkbox in front of the corresponding custom field.
- Click OK to accept the setting.
For end users:
End users can hide a custom field on the JReport Console page > Profile > Customize Server Preferences > General tab as shown in the above method, and besides have a second choice:
- On the JReport Console > Resources page, click Tools > Preferences on the task bar.
- In the General tab of the Preferences dialog, unselect the checkbox in front of the corresponding custom field, then click OK.