Variables

[av_one_full first min_height=\’\’ vertical_alignment=\’av-align-top\’ space=\’\’ row_boxshadow_color=\’\’ row_boxshadow_width=\’10\’ custom_margin=\’aviaTBcustom_margin\’ margin=\’0px\’ margin_sync=\’true\’ mobile_breaking=\’\’ border=\’\’ border_color=\’\’ radius=\’0px\’ radius_sync=\’true\’ padding=\’0px\’ padding_sync=\’true\’ column_boxshadow_color=\’\’ column_boxshadow_width=\’10\’ background=\’bg_color\’ background_color=\’\’ background_gradient_color1=\’\’ background_gradient_color2=\’\’ background_gradient_direction=\’vertical\’ src=\’\’ attachment=\’\’ attachment_size=\’\’ background_position=\’top left\’ background_repeat=\’no-repeat\’ highlight_size=\’1.1\’ animation=\’\’ link=\’\’ linktarget=\’\’ link_hover=\’\’ title_attr=\’\’ alt_attr=\’\’ mobile_display=\’\’ id=\’\’ custom_class=\’\’ aria_label=\’\’ av_uid=\’av-1vrra\’]

[av_heading heading=\’Variables\’ tag=\’h1\’ style=\’blockquote modern-quote\’ subheading_active=\’\’ show_icon=\’\’ icon=\’ue800\’ font=\’entypo-fontello\’ size=\’\’ av-medium-font-size-title=\’\’ av-small-font-size-title=\’\’ av-mini-font-size-title=\’\’ subheading_size=\’\’ av-medium-font-size=\’\’ av-small-font-size=\’\’ av-mini-font-size=\’\’ icon_size=\’\’ av-medium-font-size-1=\’\’ av-small-font-size-1=\’\’ av-mini-font-size-1=\’\’ color=\’\’ custom_font=\’\’ subheading_color=\’\’ seperator_color=\’\’ icon_color=\’\’ margin=\’5px\’ margin_sync=\’true\’ padding=\’10\’ icon_padding=\’10\’ headline_padding=\’\’ headline_padding_sync=\’true\’ link=\’\’ link_target=\’\’ id=\’\’ custom_class=\’\’ template_class=\’\’ element_template=\’\’ one_element_template=\’\’ av_uid=\’av-ka2nate8\’ sc_version=\’1.0\’ admin_preview_bg=\’\’][/av_heading]

[av_hr class=\’custom\’ icon_select=\’no\’ icon=\’ue808\’ font=\’entypo-fontello\’ position=\’center\’ shadow=\’no-shadow\’ height=\’50\’ custom_border=\’av-border-thin\’ custom_width=\’100%\’ custom_margin_top=\’10px\’ custom_margin_bottom=\’10px\’ custom_border_color=\’\’ custom_icon_color=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-3fbm\’ admin_preview_bg=\’\’]

[av_textblock size=\’\’ av-medium-font-size=\’\’ av-small-font-size=\’\’ av-mini-font-size=\’\’ font_color=\’\’ color=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-ka00b6ed\’ admin_preview_bg=\’\’]
There are 2 types of Variables you can use in Report Builder.  ‘System Variables’ are preset variables you can use in your report, and ‘User Variables’, which allow you to create your own variable for use in the report.
[/av_textblock]

[/av_one_full][av_one_full first min_height=\’av-equal-height-column\’ vertical_alignment=\’av-align-top\’ space=\’\’ row_boxshadow_color=\’\’ row_boxshadow_width=\’10\’ custom_margin=\’aviaTBcustom_margin\’ margin=\’0px,20px\’ mobile_breaking=\’\’ border=\’\’ border_color=\’\’ radius=\’0px\’ radius_sync=\’true\’ padding=\’0px\’ padding_sync=\’true\’ column_boxshadow_color=\’\’ column_boxshadow_width=\’10\’ background=\’bg_color\’ background_color=\’\’ background_gradient_color1=\’\’ background_gradient_color2=\’\’ background_gradient_direction=\’vertical\’ src=\’\’ attachment=\’\’ attachment_size=\’\’ background_position=\’top left\’ background_repeat=\’no-repeat\’ highlight_size=\’1.1\’ animation=\’\’ link=\’\’ linktarget=\’\’ link_hover=\’\’ title_attr=\’\’ alt_attr=\’\’ mobile_display=\’\’ id=\’\’ custom_class=\’\’ aria_label=\’\’ av_uid=\’av-llg45\’]
[av_heading heading=\’System Variables\’ tag=\’h3\’ link=\’\’ link_target=\’\’ style=\’blockquote modern-quote\’ size=\’\’ subheading_active=\’\’ subheading_size=\’\’ margin=\’\’ padding=\’10\’ color=\’\’ custom_font=\’\’ custom_class=\’\’ id=\’\’ admin_preview_bg=\’\’ av-desktop-hide=\’\’ av-medium-hide=\’\’ av-small-hide=\’\’ av-mini-hide=\’\’ av-medium-font-size-title=\’\’ av-small-font-size-title=\’\’ av-mini-font-size-title=\’\’ av-medium-font-size=\’\’ av-small-font-size=\’\’ av-mini-font-size=\’\’ av_uid=\’av-9n3qj\’][/av_heading]

[av_hr class=\’custom\’ icon_select=\’no\’ icon=\’ue808\’ font=\’entypo-fontello\’ position=\’left\’ shadow=\’no-shadow\’ height=\’50\’ custom_border=\’av-border-thin\’ custom_width=\’100%\’ custom_margin_top=\’0px\’ custom_margin_bottom=\’10px\’ custom_border_color=\’\’ custom_icon_color=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-hftjh\’ admin_preview_bg=\’\’]

[av_textblock size=\’\’ av-medium-font-size=\’\’ av-small-font-size=\’\’ av-mini-font-size=\’\’ font_color=\’\’ color=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-k7n2xpvo\’ admin_preview_bg=\’\’]
System Variables are useful code snippets, usually entered in the ‘PageFooterBand’ as a ‘Text & Data’ field, to provide useful information to the user.

This code is simple to use, and consists of text entered between to brackets {}

Below is a description of the code snippets and the result generated:

{Today} – Returns the current date the report is generated.
{Time} – Returns the current date and time the report is generated.
{TotalPageCount} – Returns the number of pages in the report generated
{PageNumber} – Returns the page number
{PageNofM} – Returns the page number and total pages in the report
{IsFirstPage} – Returns True if the page is the first page, otherwise returns False
{IsLastPage} – Returns True if the page is the last page, otherwise returns True
[/av_textblock]

[av_codeblock wrapper_element=\’\’ wrapper_element_attributes=\’\’ codeblock_type=\’snippet\’ alb_description=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-ka2nd8zc\’]
{Today}
[/av_codeblock]

[av_textblock size=\’\’ av-medium-font-size=\’\’ av-small-font-size=\’\’ av-mini-font-size=\’\’ font_color=\’\’ color=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-ka2ney2a\’ admin_preview_bg=\’\’]
Returns the current date the report is generated.
[/av_textblock]
[/av_one_full]

[av_one_full first min_height=\’av-equal-height-column\’ vertical_alignment=\’av-align-top\’ space=\’\’ row_boxshadow_color=\’\’ row_boxshadow_width=\’10\’ custom_margin=\’aviaTBcustom_margin\’ margin=\’0px,20px\’ mobile_breaking=\’\’ border=\’\’ border_color=\’\’ radius=\’0px\’ radius_sync=\’true\’ padding=\’0px\’ padding_sync=\’true\’ column_boxshadow_color=\’\’ column_boxshadow_width=\’10\’ background=\’bg_color\’ background_color=\’\’ background_gradient_color1=\’\’ background_gradient_color2=\’\’ background_gradient_direction=\’vertical\’ src=\’\’ attachment=\’\’ attachment_size=\’\’ background_position=\’top left\’ background_repeat=\’no-repeat\’ highlight_size=\’1.1\’ animation=\’\’ link=\’\’ linktarget=\’\’ link_hover=\’\’ title_attr=\’\’ alt_attr=\’\’ mobile_display=\’\’ id=\’\’ custom_class=\’\’ aria_label=\’\’ av_uid=\’av-llg45\’]
[av_heading heading=\’User Variables\’ tag=\’h3\’ style=\’blockquote modern-quote\’ subheading_active=\’\’ size=\’\’ av-medium-font-size-title=\’\’ av-small-font-size-title=\’\’ av-mini-font-size-title=\’\’ subheading_size=\’\’ av-medium-font-size=\’\’ av-small-font-size=\’\’ av-mini-font-size=\’\’ color=\’\’ custom_font=\’\’ margin=\’\’ margin_sync=\’true\’ padding=\’10\’ link=\’\’ link_target=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-ka2nht2n\’ admin_preview_bg=\’\’][/av_heading]

[av_hr class=\’custom\’ icon_select=\’no\’ icon=\’ue808\’ font=\’entypo-fontello\’ position=\’left\’ shadow=\’no-shadow\’ height=\’50\’ custom_border=\’av-border-thin\’ custom_width=\’100%\’ custom_margin_top=\’0px\’ custom_margin_bottom=\’10px\’ custom_border_color=\’\’ custom_icon_color=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-hftjh\’ admin_preview_bg=\’\’]

[av_textblock size=\’\’ av-medium-font-size=\’\’ av-small-font-size=\’\’ av-mini-font-size=\’\’ font_color=\’\’ color=\’\’ id=\’\’ custom_class=\’\’ av_uid=\’av-k7n2xpvo\’ admin_preview_bg=\’\’]
‘ User Variables’ provide temporary storage in a report and can be used to create more complex reports.

An example of why you would use a variable is shown below.

If you had an Expenses app, the normal list view would show all expense items:

\"\"

If you wanted to have a summary of each ‘Expense Type’, the sum of the ‘Amount’, and the ‘Expense Notes’ shown on one line, it would normally be difficult to amalgamate the ‘Expense Notes’ from different rows into one string of text. You can however achieve this by using Variables.

An example report is shown below:

\"\"

The best way to demonstrate the use of Variables is to take you through how the above report was created.

To create a Variable, select the ‘Dictionary’ option to the left of the form.

This will show the options available.

\"\"

To create a new Variable, select the ‘New Item’ icon DictionaryOptionsDropdown

This will expose a list of options, select ‘New Variable’

\"\"

After a new Variable is created, a popup box will appear to create your variable.

\"\"

When entering the ‘Name’, in this case ‘ExpenseNotes’, please ensure you don’t have any spaces in the text.  The ‘Alias’ can be anything you like.

Since the ‘Expense Notes’ was a ‘Note’ field type, you will need to use a ‘String’ for the ‘Type’.  All other options should be set as per screenshot above.

On completion of the new Variable, select ‘OK’.

Once a Variable has been created, you can edit the Variable by clicking on the Variable name and selecting the edit icon \"\"

Now we need to add the elements of the Variable to the form:

\"\"

In the DataBand, you will need to add a ‘Text’ field to the Databand and set the value of the Variable. In this example {ExpenseNotes += ReportData.Notes + ” / “} is used. This sets the Variable ‘ExpenseNotes’ to be the field name created in the app, and uses ‘+ ” / “‘ between each Expense Note. Once you have created this, you will need to set the height of the variable field to zero (set in the properties of the field).

In the GroupFooter Band, you will need to add a field with the following expression: {ExpensesNotes =””}. This sets the value of the variable to a blank string for each ‘Expense Type’, otherwise it will amalgamate all ‘Expense Notes’ together, regardless of the ‘Expense Type’. Once you have created this, you will need to set the height of the variable field to zero (set in the properties of the field).

Finally, we need to set the actual field which will show the contents of the Variable. In the GroupFooter Band, create a new field and enter an expression of: {ExpenseNotes}
[/av_textblock]
[/av_one_full]

Scroll to Top