How to conditionally prevent a static table from printing on a report
If you have a form that contains a static table that isn't always populated, you may not want the table to print on the report when the table is empty. This can be helpful when you have a simple form. Typically, you'd probably have a form with conditions and based on answers information prints on a report. However, maybe your form just has one static table that techs can skip over when it's not applicable and you don't want that information to print on the report.
To conditionally prevent an empty static table from printing on a report, complete the following.
- In the Form Designer, click (Reports) and select your report to open the Report Designer.
- Click on the static table/sub-report (in this example, If_confined_space_complete_requirements).
- From the menu on the right side of the Report Designer, click f to open the Expressions panel.
- Expand the Before Print section.
- Click the three dots in the Visible field to open the Expression Editor.
- Select each field in the sub-report and enter a conditional expression. So, in this example, you would enter Not
(
[Form Answers.If_confined_space_complete_requirements_1_LockoutTagout_Column_2] == '' And
[Form Answers.If_confined_space_complete_requirements_1_Harness_Required_Column_2] == '' And
[Form Answers.If_confined_space_complete_requirements_1_Witness_Present_Column_2] == ''
) then click Apply. - Click OK.
- Save the changes made and close the sub-report.
- Save the changes made in the Report Designer and close the Report Designer.
- Click(Save) in the Form Designer to save the changes made.
- Now, if you don't populate the table, it will not print on the report when the form is submitted.
In the following illustration notice no confined space information has been entered in the static table on the form: - The form has been submitted and the empty static table doesn't print on the report.
FormsPro Report Designer uses DevExpress tools to create reports. For detailed information about DevExpress, see DevExpress Documentation.