In this section, it is possible to add one or more rules to a report template. Template rules are used to control how reports behave when creating and editing.
It is e.g. possible to:
•Show and hide sections and fields based on changes in report fields
•Change the value of a report field based on changes in other fields
•Change the formatting of a report field based on changes in other fields
About template rules
•A template can have several rules
•Rules are executed in the order in which they are inserted
•The order of the rules can be changed
•Rules can be executed by report creation or report editing or both
Conditions
Conditions determine when a rule should take effect. A rule can contain several conditions.
It is allowed to make a rule without conditions. This causes the rule to perform the defined actions immediately after the report is displayed on the screen, without waiting for input from the user.
Unconditional rules can be used if you want to start by hiding one or more sections when creating a report.
Conditions are built by selecting a report field, a condition and a value.
The following field types can be used to build conditions
•Title
•Responsible
•Text
•Date field
•Check box
•Combo box
•Radio buttons
•Search field
•Number
•Formula
Conditions can e.g. be Equal to or Not equal to, it depends on the selected field type which conditions can be selected.
For fields of type Combo box, Radio buttons and Search field, the contents of the underlying data source are displayed as options in the Value field.
For fields of type Check box, Yes / No appears as options in the Value box.
For fields of type Date field, a calendar is offered to assist with date selection
It is allowed to create a condition where a value is not set / selected.
Conditions are validated in the order in which they are inserted.
Actions
Actions determine what the rule must perform when the conditions of the rule are met.
A rule can contain several actions and must contain at least one action.
Actions are built by selecting an action and then selecting the report field or report section on which to perform the action. For certain actions, one or more values must also be selected.
The following actions can be used:
•Hide field
•Show field
•Go to field
•Set field value
•Format field
•Hide section
•Show section
•Close section
•Open section
Actions can, with certain exceptions, be performed on all field types and sections.
The Set field value action cannot be applied to these field types:
•Formula
•Image / File
•Chart
•Report list
•Status
•Gauge
•Signature
The Format Field action cannot be applied to these field types:
•Label
•Image / File
•Chart
•Report list
•Status
•Gauge
•Signature
•Text fields where the Rich-Text Editor option is selected
The Go to field action cannot be applied to these field types:
•Label
•Formula
•Chart
•Report list
•Status
•Gauge
•Signature
The Show / Hide section actions cannot be applied to templates using Wizard mode.
Actions are performed in the order in which they are inserted.
How to do it:
•Open the report template See Edit Report Template
•Click the Rules tab
•Click Add Rule
•On the page, Step 1: What conditions should be checked, add the conditions that must be met for the rule to take effect (This step can be skipped if you want the rule to be executed without conditions):
o Select a report field from the Fields drop-down list
o Select a condition from the Condition drop-down list
o Select / Insert a value in the Value field (This field can be left blank if you want the condition to be met if the report does not contain a value in the selected report field)
o Click Add Condition to add it to the list
o An optional number of conditions can be added
o Click Next when you have finished adding conditions
•On the page, Step 2: What actions must be performed, add the actions that should be performed on the report when the conditions set out in Step 1 are met:
o Select an action in the Action field
o Select a field or section on which to perform the action in the Field / Section field
o Click Add Action to add the action to the list
o Click Next when you have finished adding actions
•On the page, Step 3: Complete the configuration of the rule, you must give the rule a name and tell when it should be executed:
o Insert a name in the Enter a name for this rule field
o Uncheck Apply this rule when creating a report if you do not want the rule to be executed when creating reports
o Uncheck Apply this rule when editing a report if you do not want the rule to be executed when editing reports
o Remove the Activate the rule check box if you do not want the rule to be active
o Click Save to save the rule
o The rule now appears in the rule list
o The order of the rules in the rule list can be changed by dragging and dropping them at the desired location
o Click on a rule in the list to edit it