Skip to content

Report Desk: CheckBoxes

Release Date: 4/28/23
Version 8.6

When to Use a CheckBox Instead of a Column

Sometimes, you may want to give the user a Yes-or-No option to include some information in a report.  For example, you might want to generally exclude records with a balance of zero, but give the user the option to include those records.  It would be awkward to select a column like COM_DUE_OR_AMT_PAID and ask the user to enter a value, like zero, that would include or exclude those values.  This is where a CheckBox is handy.

How to Use a CheckBox

To include a CheckBox in the input parameter Screen, expand the [CheckBox] node in the treeview (see lower red box below) and drag the [New CheckBox] node to the desired row in the Where grid.  Then click in the prompt area (upper red box) and change the prompt:


After changing the prompt to something like "Include Zero Amount Commissions?", click on the Info icon to bring up the dialog for changing the CheckBox properties:


First, you probably will want to change the name of the column.  (It is for readability during design only.)  Names must be unique within the gridview Column, must not contain spaces, and must not start with "[" nor end with "]."

Then, enter the desired WHERE phrase and select either Checked or Unchecked in the area titled Include the WHERE phrase when the Checkbox is:

In this example, the WHERE phrase will be added to the SQL SELECT statement when the CheckBox on the input parameters screen is not checked.  

You may also indicate whether the CheckBox is checked or unchecked by default.

Press OK to save the properties, or press Cancel to ignore your changes.

After making this change, the input parameters screen looks like this:


Hidden CheckBoxes (Adding Custom SQL to a Report)
Beginning in December, 2023, support has been added for hidden CheckBoxes.  Think of a hidden CheckBox as a way to add custom selection criteria to the SQL statement that is generated for a report.  

In the following example, the designer wanted to restrict an Order Edit List report to open orders only.  This can be done by adding a CheckBox to the design like this:


When checked (the default value) this checkbox adds the WHERE text specified here to the SELECT statement and the input parameter screen looks like this:


The CheckBox option appears on the screen, checked by default.  This effectively gives the user the default option to restrict the report to open orders only.  But what if the report designer wants the report restricted to open orders without giving the user the option to uncheck the CheckBox?  That's where the Hide this CheckBox from the user design-time option comes in:


As you can see below, this removes the option to uncheck open orders only:


So, the designer has added additional selection criteria to the report without having to change the SQL template and without exposing an option for that behavior to the user.  This is a powerful addition to the customer's ability to create a modified report with additional selection criteria without having to request a new SQL template.

JEG
EL850RD.VB
UDRDesigner.VB

Feedback and Knowledge Base