You can use the following variables and include them in an output report filename.
A date variable is a variable for the current date and time. (See section $date in the previous chapter). The date variable consists of:
Using a date variable without an attribute causes it to format the current date and time into a default format.
The syntax: ${date}
For example:
C:\OutputReport\index_${date}.html |
The output report filename would be “index_2011-12-21 11.55.44.html”.
Using a date variable with an attribute causes it to format the current date and time into a specific format.
The syntax: ${date.get('format')} or ${date.get("format")}
For example:
C:\OutputReport\index_${date.get('yyyyMMdd-hhmmss')}.html |
The output filename would be “index_20111221-115544.html”.
A template variable is a variable for a template that is created in Report Wizard. It allows you to add all template variables into an output report filename (see Including Variables in a Template).
When you include template variables created in an output report filename, the output filename which consists of the variables will be converted into value. This section uses the following template variables as examples, see figure below.
You can retrieve a top-level variable in an output report filename by using the following syntax.
The syntax: ${Parent}
For example:
C:\OutputReport\index_${Parent}.html |
The report output filename would be “index_parent value.html”.
You can retrieve any of the following child variable values in an output report filename.
For example:
C:\OutputReport\index_${Parent.get('Child')}.html |
The output report filename would be “index_child value.html”.
Report Wizard supports only pseudorandom numbers in an output report filename. The random number consists of:
You can use Report Wizard to generate pseudorandom numbers with the default distributed integer value.
The syntax: ${random}
For example:
C:\OutputReport\index_${random}.html |
The output report filename would be “index_21547.html”.
You can use Report Wizard to generate pseudorandom numbers with the default distributed integer value between 0 and a specific value.
The syntax: ${random.nextInt(n)}
The Parameters:
“n” - the bound on the random number to be returned. The “n” value must be a positive integer.
For example:
C:\OutputReport\index_${random.nextInt(1000)}.html |
The output report filename would be “index_457.html”.
You can add a project attribute or information about a project into an output report filename.
The project attribute consists of:
You can retrieve the name of a project by using the following syntax.
The syntax: ${project.name}
For example:
C:\OutputReport\index_${project.name}.html |
The output report filename would be “index_myProject.html”.
You can retrieve a teamwork version of a project by using the following syntax.
The syntax: ${project.version}
For example:
C:\OutputReport\index_${project.version}.html |
The output report filename would be “index_1234.html”.
You may accidentally specify an invalid output report filename such as:
If this happens, Report Wizard will use this variable as a filename and a warning message will open in a log file (\.modeling tool\version\md.log).
For example:
C:\OutputReport\index_${date.get('yyyyMMdd-hhmmss)}.html |
A single quote after “yyyyMMdd-hhmmss” was missing. Therefore, the output filename would be “index_${date.get('yyyyMMdd-hhmmss)}.html” and a warning message would open, see figure below.
For example:
C:\OutputReport\index_${Parent}.html |
“${Parent}” was not in the report template variable. Therefore, the output filename would be "index_${Parent}.html" and a warning message would open, see figure below.
For example:
C:\OutputReport\index_${date.get('yyyy-MM-dd qq')}.html |
In this example, ‘yyyy-MM-dd qq’ is an invalid parameter. Therefore, output filename would be “index_${date.get('yyyy-MM-dd qq').html” and a warning message would open, see figure below.
If you specify a template variable whose name is at random in the Report Data, the variable value will be used as the filename. The output filename would be “index_myRandomNumber.html”. If you do not specify a template variable whose name is at random in the Report Data, the random number with the default distributed integer value will be used as the filename. The output filename would be “index_12345.html”. |