Application Variables
Application Variables are dynamic values that can be referred to in a Report Heading, List, or Drill Report definitions. Some variables are defined and maintained by the application administrator within the Modeler and some are predefine by the System. When refreshing a report Application Variables are first evaluated to return a value and the value returned is then used by the report. Variables can be nested inside each other for things such as one variable being used as a parameter to another variable. (Note: If you need to include a comma within a parameter value it can be coded as , so it is not confused as multiple parameter values instead of one value.) Variables are referred as follows:
{{@applicationvariablename}}
- Returns the value of the variable
{{@applicationvariablename(@parameter1,@parameter2)}}
- Return the value of the variable, with all parameter values dynamically substituted for the application variable names within the value defined for the variable.
- If a parameter does not exist within the reference to the variable, it will assume the parameter name.
System Variables
The following Application Variables are predefined by the software:
- @CLSERVERURL– the url entered on the logon screen to access the server.
- @CLSERVER – name of the server as determined from the logon url
- @CLHTTPPROTOCOL – http or https as determined from the logon url
- @CLCURRENTMEMBER(Dimension) – see ClCurrentMember function for more info
- @CLPROPERTY(Member,Property) – see CLProperty function for more info
- @CLTIMEOFFSET(Member,TimeOffset,Levelname) – see CLTimeOffset function for more info
- @PCFULLCV – Fully qualified CV with comma separated entry for each dimension as follows: [Dimension].[Hierarchy]=[Dimension].[Hierarchy].[Member],…
- @PCDIMCV(Dimension) – Fully qualified CV setting for one dimension
Examples
Following are some examples of Application Variable usage:
- Simple variable defined by an admininstrator to contain the current reporting period for a model -
@CurrentPeriod = “March 2010”
- Valid to previous version V3: Given that @BudgetYear is defined as [Time].[Time].[2015] the code below will give the description for this member
{{@CLProperty({{@BudgetYear}} , Description)}}
- Report that shows periods from the beginning of the current year to current period –
{{@CLTimeOffset({{@CurrentPeriod}}, BEG, Year)}}:[{{@CurrentPeriod}}]
- Report that shows periods from the current period to the end of the year, excluding the current period –
~[{{@CurrentPeriod}}]:{{@CLTimeOffset({{@CurrentPeriod}}, END, Year)}}
- Rolling time periods starting starting 5 months prior to the current period through 6 after the current period for a total of 12 rolling months –
{{@CLTimeOffset({{@CurrentPeriod}}, -5, Year)}}:{{@CLTimeOffset({{@CurrentPeriod}}, 6, Year)}}
- Report that shows periods from a period specified by a dimension member property to the end of the year –
[{{@CLProperty(Dimension,Property)}}]:{{@CLTimeOffset( {{@CLProperty(Dimension,Property)}},”END”,”Year”)}}
- Drill report for a url to call a standard Web Drill Report -
{{@CLHTTPPROTOCOL}}://{{@CLSERVER}}/ReportServer?ReportName
- If your admin defines the above as variable named DrillReport the same could be simplied to –
{{@DrillReport(Reportname)}}