Velocity References for Reports
The following Velocity references are available for use in Reports anywhere where text is used. These references pick up, contain, display, and print the given values. Generally, Velocity references in Reports are used for display and print purposes when creating, editing, scheduling or running Reports and Focused Reports. In some cases, they are used for more than that. For example in archived reports, $Archive_Report_Folder
and $Archive_Report_Name
determine the location where reports will be stored.
Note: The following table shows the complete set of applicable references for use with Reports. Other types of references (such as those discussed in the previous sections of this topic) do not apply to Reports. However, most of the details in Velocity Template Usage Tips also apply to Velocity Templates for reports.
Category |
Reference |
Description |
---|---|---|
Report |
$ReportName |
Prints the name of the report, as specified in the Name field on the Attributes tab of the Report Editor. |
|
$AccessDisclaimer |
Prints a disclaimer statement regarding the user permissions with which the report was run. The disclaimer statement is a read-only string which is generated when report data has been filtered due to limited access privileges of the user Reports are generated only with data for which the current user has access privileges. Depending on user permissions for the user running a given report, access to some types of events or data may be curtailed. In such cases, the report is generated with all the information for which the user has access privileges. Events and data requiring higher-level access privileges are not included in the report. The access disclaimer statement is a standard explanation of the limitations of such a report. |
|
$CurrentPageNumber |
Prints the current page number of the report. |
|
$TotalPageNumber |
Prints the total number of pages in the report. |
Time |
$CurrentDateTime |
Prints the current date and time. (Same as $Now) Example output: 12-06-2011-15:32:19. Tip: Formats for dates and times depend on your Console preference settings. To change the way dates and times are displayed throughout the Console, choose Edit > Preferences, then click the Date & Time button. For more information, see Setting Date and Time Formats. |
|
$CurrentDate |
Prints the current date per your format preferences. Example output: 12-06-2011. |
$CurrentMonth |
Prints the current month. Example output: 12-2011. |
|
$CurrentWeek |
Prints the current week. Example output: 49-2011 (for December of 2011). |
|
$Now |
Prints the current date and time. (Same as $CurrentDateTime) Example output: 12-06-2011-15:33:00. |
|
$Today |
Prints today's date. Example output: 12-06-2011-00:00:00. |
|
$CurrentDateTime-<Number>d |
Prints the current date and time minus the number of days you specify. For example, if you ran the report on 12-06-2011 at 15:33:00 and specified the current date and time minus 1 day ( If, on the same day, you specified the current date and time minus 3 days ( |
|
Parameters |
$Report_Format |
Prints the name of the report format that is configured as the default. Output formats are:
If the default output format for the report is set to html, then See Setting Default and Custom Report Parameters for information on how to set the default output formats for reports when creating reports. See also Running a Report in for information about setting parameters at report runtime. |
$Page_Size |
Prints the page size of the report. Example output: Letter [8.5x11 in] |
|
$Run_as_User |
Prints the user name specified, if any, for the Run as User parameter in the report. |
|
|
$Email_to |
Prints the e-mail address specified, if any, for the Email to parameter in the report. |
|
$Email_Format |
Prints the e-mail format specified, if any, for the Email Format parameter in the report. For example, Send URL or Attach Report. |
$Filter_by |
Prints the filters used by the referenced query for this report. |
|
|
$Archive_Report_Folder |
Prints the folder location where the archived report is stored. |
$Archive_Report_Name |
Prints the name of the archived report. |
|
|
$Archive_Report_Expiration_Time |
Prints the expiration time for an archived report. |
|
$<ComponentID>.Row_Limit |
Prints the row limit for the specified component. Tip: <ComponentID> refers to the data components or building blocks of a report. To view the components of a given report, right-click the report in the Navigator panel, choose Edit Report, and click the Data tab for the report. For example, if the report contains a component called Table, you can display related information by using the Velocity reference Similarly, if the report, contains components called Chart1, Chart2, and Chart3; you can display related information on each of the charts by using references such as |
|
$<ComponentID>.Time_Zone |
Prints the time zone for the specified component. For example, Example output: America/Los_Angeles |
$<ComponentID>.Start_Time |
Prints the start time for the specified component. For example, Example output: 12/05/2011 17:46:50.406-0800 |
|
$<ComponentID>.End_Time |
Prints the end time for the specified component. For example, Table.End_Time would output the end time used for the data in a component called Table in your report. (End Time is a report parameter which can be configured on a per-component basis.) Example output: 12/05/2011 18:00:21.140-0800 |
|
$<ComponentID>.<Parameter_name> |
Prints the value of the specified component parameter. |
|
$Custom.<Parameter_name> |
Prints the value a custom component parameter. |