Parameterized Phrases

The Report Studio is still under development and has not officially been released. Be warned that code may change such that reports you create with this pre-release trial version might need to be updated in order to continue working after your next VTScada update.

Until the official release, documentation for the Report Studio will open in response to the F1 key but will not be shown in the menu system. To view a table of contents for the complete chapter, navigate to Report Building (Report Studio)

Parameterized phrases are used for any customizable wording within a report, including:

  • The header text of any column.
  • The display of time and date information.
  • Any text that you add to the body of the report.

Parameter variables begin with a % and are enclosed in square brackets. This token acts as a placeholder in your report definition. When the report is run, the variable is replaced by a real value that is current to the time the report was run. All other text is passed through, exactly as written. You do not need to include a variable in your phrase. Report Studio will except a phrase that is fully plain text.

Clicking [ + ] next to a variable will add the token to the end of your phrase, but typing the full token out also works. This field is as editable as any string entry field. Type characters out before or after variables, use copy, cut and paste to rearrange variables and text.

When building a parameterized phrase, leave a space between each element unless you want words to run together. If building your own time format, it is up to you to include colons between hours, minutes, and seconds.

Some parameter phrase variables permit you to select a level or change the output format of the variable.

Data Set Column Labels

Where available, click the level field to open a droplist of options.

ShortName Text The name of a tag, excluding all parents.
DataColumn Text The function applied to the column.
Field Text For any I/O tag (including legacy input / output tags) this is simply "Value".
           FField is most useful when displaying driver statistics or values from custom tags that store data other than value
Units PhraseID Engineering units configured for the tag displayed in any column.
RelativeName Text The name of a tag including parents to the selected Context or the top of the tag tree.
Description PhraseID The configured description of each tag.
AncestorShortName Text The shortname of an ancestor tag at a specified level (default: 1).
Ex. If tag = Station 1\Pump 1\Flow, Then AncestorShortName at Level 1 = "Pump 1"
AncestorRelativeName Text The name of an ancestor tag at a specified level (default: 1) including parents to the selected Context or the top of the tag tree.
Ex. If tag = Station 1\Pump 1\Flow, Then AncestorShortName at Level 1 = "Station 1\Pump 1"
AncestorDescription PhraseID The configured description of an ancestor tag specified by level (default: 1).

AncestorShortName and AncestorRelativeName are handy in Pivot Tables.

Time Parameter Variables

Click Format to change the output format of a variable

Time Time Time displayed as h:mm tt by default. (tt represents AM/PM)
Date Date Date displayed as yyyy-MM-dd by default.
Hours12 Time The current hour using a 12-hour clock.
Hours24 Time The current hour using a 24-hour clock.
Minutes Time Of the time expressed as hh:mm:ss, this is only the mm.
Seconds Time Of the time expressed as hh:mm:ss, this is only the ss.
SubSeconds Time Seconds with three decimal points of accuracy.
AMPM Time AM or PM
DayNum Date The day of the month expressed as a number.
MonthNum Date The month expressed as a number from 1 to 12
Year Date The year, YYYY by default.
DayString Date The name of the day of the week.
MonthString Date The name of the month of the year.

Text Component Variables

StartDate Date Starting date of the reporting period.
StartTime Time Starting time of the reporting period.
EndDate Date End date of the reporting period.
EndTime Time End time of the reporting period.
RunDate Date The date when the report was run.
RunTime Text The time when the report was run.
WorkstationName PhraseID The name of the workstation from which the report was generated.

Time Duration Variables

Time Duration variables are relative to:

  • Report Tag Query dataset --> Running Time data column
  • Report Recipe Batches dataset --> Batch Duration and Step Duration data columns

(Each of the following examples is based off of a total run time of 326589.1234 seconds)

TotalSecondsFullPrecision Text Total running time, in seconds, to 4 decimal points. (ex. 326589.1234)
Milliseconds Text The number of milliseconds in the run time value. (ex. 123)
TotalMilliseconds Text Total running time in whole milliseconds. (ex. 326589123)
Seconds Text The number of seconds in the run time value. (ex. 9)
TotalSeconds Text Total running time in whole seconds. (ex. 326589)
Minutes Text The number of minutes in the run time value (ex. 43)
TotalMinutes Text Total running time converted to whole minutes. (ex. 5443)
Hours Text The number of hours in the run time value. (ex. 18)
TotalHours Text Total running time converted to whole hours. (ex. 90)
TotalsDays Text Total running time converted to whole days. (ex. 3)
TimeZone Text The time zone of the workstation. Appears after the WorkstationName.

Custom Parameters

As described in Report Parameters, parameters that you create for your report can also be used in your parameterized phrases. This is useful for report titles, column headers and text components. Custom tag type parameters can be defined to display tag information in text components.

Create and Manage Data Sets

Design your Report Layout

Report Parameters