The Variables page in the New Report From
Template wizard lets you provide values for the variables defined in the
template.
There is only one section in the Variables page, the
Placeholders section.
Figure 1. Variables page
In the Placeholders section, a table lists all of the template variables.
Click on the row containing a variable to see its location in the report; as you select a variable,
the section of the report that relates to the variable highlighted in the report sample.
Each variable can be set to a single value. There are three types of values that can be
applied:
- A value can be static text. To enter a fixed value, type the value directly into the cell.
- A value can be a field name from your data source. Click on a cell to activate the combobox and
select a field from the list.
- A value can be an expression. Click on the expression icon (fx) to launch the expression editor.
Tip: An expression can be comprised of multiple fields. For example, you may wish to put
a customer's first and last name in a field. You would use an expression to concatenate the fields,
with proper spacing.
The types of variables will depend on the template; a template designer has complete freedom to
define the variables necessary for the template being developed. Here are some examples of types of
variables:
- Variables can hold strings. Common variables of this type are report titles.
- Variables can display the content of a field or fields. Common variables of this type would be
including grouping data in sub-sections of a report.
- Variables can be boolean flags. You can have a variable that includes a section to print page
totals, based on whether you specify 1 (true) or 0 (false). For example, see printPageTotals in
Figure 1
These are just a few examples of the types of variables that one may have added to a report
template. As a user of a template, ensure you know what each variable does, and what types of values
are expected.