Environment variables in output paths
You can standardize the output paths listed in the document
specifications with environment variables. Create an environment variable
for a common output location, and then specify that environment variable
with the individual file name in the document specification.
The syntax for specifying the environment variables is the same as the one used in pre-commands and post-commands; the variable name must be enclosed in ${variable_name}. Example: ${MY_RPE_OUTPUT}\defectData\testData.pdf
Note: Environment variables can be set for:
- A user profile: User profile variables are accessible only by the logged-in user.
- The system: System variables are accessible by any user who logs on to the computer.
If a document specification containing an environment variable is moved to another computer, you must set the environment variable on that computer also for the document specification to run successfully.
Advantages of using environment variables instead of absolute paths
- If you must change the common location of the output files to another folder or server, you can update the environment variable. You do not have to modify each document specification individually.
- You can control the output of a report with the command-line API.
Example
Creating an example environment
variable on Microsoft Windows :
- Right-click the Computer icon.
- Select Advanced System Settings.
- Click Properties.
- Select the Advanced tab.
- Click Environment Variables.
- In the System variables section, click New.
- Enter a Variable name. Example: MY_RPE_OUTPUT
- Enter a Variable value. Example: d:\myreports
- Click OK in each window to save and close.
Specifying
the environment variable in the document specification output path:
- In the Launcher application, create a document specification.
- In the Document Specification view, select an output type. Example: Target: PDF
- Right-click the output type and select Configure output.
- In the Path field, enter the path for the output file. Example: ${MY_RPE_OUTPUT}\defectData\testData.pdf
- Click OK.
- Publish a test document and verify that the output is generated in the correct location.