Using Variables in Other Report Properties

Using Variables in Other Report Properties

Variables (System and Pass Through) variables can also be used in certain properties on a report to dynamically affect them when a report is run. Some scenarios where this might be useful are listed below:

Example 1

You are specifying an output file in the “Generate Output File” property on a report and you want the file name to not be totally hard coded but to be effected by the System Variable such as the today’s date (@DATE@).

In the “Generate Output File” property specify a file name such as C:MyReportsSales_@DATE@.xls

Whenever the report is then run a copy will be saved with the name “Sales_” plus the date.

Example 2

You are specifying an output file in the “Generate Output File” property on a report and you want the file name to not be totally hard coded but to be effected by a Pass Through Parameter on the report named @REGION@

In the “Generate Output File” property specify a file name such as C:MyReportsSales_@REGION@.xls

Whenever the report is then run a copy will be saved with the name “Sales_” plus the Parameter specified for the @REGION@ pass through variable.

Example 3

You are using the PublishSheet Add-In on a report to publish to an HTML output file using the “Run Add-Ins” property on the report. You want the HTML file name to be effected by a Pass Through Parameter on the report named @REGION@

In the “Run Add-Ins-” property specify something similar to this : PLPLUGA.C.PublishSheet(Pivot,\myserverintranetreportsSales_@REGION@.htm)

Whenever the report is then run a copy will be published with the name “Sales_” plus the Parameter specified for the @REGION@ pass through variable.

Example 4

You are using the EmialSMTP Add-In on a report to email the report using the “Run Add-Ins” property on the report. You want the Email address to be dynamic based on a Pass Through Variable that is entered at run time. The pass through variable is named @EMAILTO@

In the “Run Add-Ins-” property specify something similar to this: PLPLUGA.E.MailSMTP(MySMTPServ13,@EMAILTO@,me@myservo.qq,Your Sales Report,Please see attached file.,1,Report.xls)

Whenever the report is then run a copy will emailed to the email address specified in the parameter for the pass through variable @EMAILTO@

Example 5

You have written a macro into your reports template file in Excel that requires a Sales Rep to be passed in at Run time. The Macro is called AnalyseSalesRep and takes one parameter for the Sales Rep Code. You have defined a Pass Through Variable in the container and on the report called @SALESREP@ that you wish to pass in to the Macro so it can perform some specific logic.

In the “Run Macros” property specify something similar to this: AnalyseSalesRep(@SALESREP@)

Whenever the report is then the Macro will receive the selected Sales Rep code and execute.


    • Related Articles

    • Sharing Report Shortcuts using Intelligence Reporting

      Problem When you create a report shortcut, it creates and points to a file within the AppData directory of the user that created the shortcut, which in turn points to the BICore.exe on the machine. When another user tries to run the report shortcut, ...
    • Creating a Report Shortcut in Intelligence Reporting

      An LNK file allows a report to be run from a shortcut without needing to use the Report Manager Interface. LNK files need to be created using the Report Manager Interface and then associated with the Alchemex.exe program under the windows operating ...
    • Number 75: Path/File access error

      Problem When launching any module of Intelligence Reporting, you get a file/access path error When trying to run a report you get this error Resolution Check that you have full read/write access to the Metadata Repository Check that you have full ...
    • How do I create a Report Shortcut and save it for other users to run

      Description: How do I create a report shortcut and save it on local network for other Intelligence Reporting users to run. Please note: these users need to have a version of Intelligence Reporting installed to run from the shortcut. Issue: Client has ...
    • Report Distribution using Intelligence Reporting

      Distribution Settings Email is the most popular distribution channel.  By default, your Microsoft Outlook profile settings will be used by Sage Intelligence to send emailed reports automatically, however, if this is not preferable, or you do not have ...