Adding comments to a report template is very useful to document the function of individual report sections.
Text boxes with a "visibility" check box un-checked can do this job, but the box consumes the same space on the report as the visible box would use.
To add multi-line comments you can could use the following procedure:
- Go to report properties, report parameters and add a new report parameter ShowComments. Data type should be boolean and the default value should be false. If you do not want users to print the comments with the the report, select the internal check-box. An external parameter could be used to toggle the report comments on or off - which could be useful, too.
- add 2 text boxes to your template and write you comment in one of the boxes
- Group both text boxes. Unlike single text boxes groups can be filtered.
- You may delete one the text boxes. The grouping will remain.
- Open the group properties and set group repeat=1 (Note: Only repeated groups can be filtered)
- Define a group filter expression like =iif(ShowComments=True,1,0) = 1
In case the parameter is set to false, the iif statement returns 0 and the group does not appear on the report.
You can save this group as a composite group for reuse in other sections or templates.
Note: This trick cannot be applied to "hidden" calculations. If you would filter such a group, the calculation would not be executed.
(originally posted in OpenLAB Forum: https://zohodiscussions.com/openlabcdsforum#Topic/68030000000164009
2015 February 4 by betrich)