How to Use Environment Variables

    Moving an NPrinting project is easier thanks to the new feature that lets you configure environment variables. NPrinting supports environment variables, custom variables and relative paths in template files and .qvw paths. When you move your project you'll only need to change the variable values.


    Open the Environment Variables

    1. Select Tools tab in the upper-right side of the window
    2. Click on Environment Variables

    Create a New Environment Variable


    The Environment Variables window lets you manage the environment variables that can be used in paths. A grid shows all configurable environment variables. The "Environment Configuration" can be also opened using the  new "Configure" button in the "NPrinting Files" section of the Management Console.

    1. Click on the New button
    2. Enter evProjectRoot as Name. We suggest beginning the name with "ev"
    3. Enter the path to the NPrinting project folder or browse - select the folder by clicking on the browse button at the far right.
    4. Click OK

    If this variable already exists, click on the Edit button and change its Value with the new project folder.

    Create the Template Files Variable


    You can use an Environment Variable to create another variable. The second variable will be affected by changes made to the first one.

    1. Click on New
    2. Enter evTemplates as Name
    3. Click on the Environment Variables button

    Select the Environment Variable Already Created


    In this window you can see three kinds of variables:

    • NPrinting Variables: there are variables for some of the folders you specify in the NPrinting Options. For example: “Default output folder”, “Default templates folder”, etc. These variables have the NPrinting logo as icon.
    • User Variables: inserted by the developer using the “Environment Variables” icon in the “Tools” bar and represented by a “man-shaped” icon
    • System Variables: are the path variables defined in your OS and represented by a PC icon. To see them in a Report template or a QlikView document path, click on the variable icon (the blue one near the “dots” on the right) then right-click on one row and select “Show system variables”
    1. Select the evProjectRoot variable just created
    2. Click on OK

    Complete the Template Path

    1. Add the name of the Templates folder
    2. Click on OK

    Repeat these steps for each folder that you want to add. Do this if you want to transfer projects between computers. Simply change the evProjectRoot variable value.

    The Use of Environment Variables in Reports


    You can use Environment Variables by clicking on the button to the right of the Template name field to set the path. It’s also possible to insert an environment variable in the Tasks output folder. If you hover your mouse pointer over the inserted environment variable tag you will see the complete path.

    The Use of Environment Variables in Tasks


    In the task setting window, select Custom folder as the Output folder field


    Add the Environment Variable

    1. Select Environment Variable as Type from the drop-down menu
    2. Click on the three dots
    3. Select desired variable
    4. Click OK

    Path updates with Environment Variables


    Optimize Paths easily converts absolute paths from old NPrinting projects into paths that include Environment Variables in an NPrinting project.

    1. Select Tools tab on the upper-right side of the window
    2. Click on Optimize Paths

    Update Paths


    The Current Path column represents the old path whereas the Optimized Path includes the proposed path with variables.

    1. Select the paths you want to update by checking their respective boxes in the Update column
    2. Click the Update button