6 Replies Latest reply: Sep 6, 2017 6:22 AM by Ruggero Piccoli RSS

    How to have Different Server Name in NPrinting document

    Kuldeep Rana

      Hi Team,

       

      I have created a NPrinting document NPrintingDoc.nsq which uses a Qlikview file QV1.qvw as its Connection.

       

      We have 2 Environments viz. Test and Production

      QV1.qvw file is present in \\qlikview-Test-t01\Dummy1\QV1.qvw in Test Server

      QV1.qvw file is present in \\qlikview-Prod-p01\Dummy1\Dummy2\QV1.qvw in Production Server


      So, presently we have to manually change the Connection everytime we move the File from Test to Production which is an overhead.


      Can we not use Variables in .nsq file for Connection so that it will pick the Connection automatically. if there is a way by which I could use ComputerName() and then Variables to store the above paths then kindly suggest.


      Presently, I am unable to find any solution myself and maintain Files with Test and Production connection in seaparte folders so that Deployment team simply needs to move Files instead of changing the Connection. Kindly Suggest.


      Thanks.

      Kuldeep.

        • Re: How to have Different Server Name in NPrinting document
          Thomas Cullinane

          Its not something I've done but you could try relative paths - unlikely to work but worth a  shot.

           

          Alternatively you may be able to work something out using this

          How to Use Environment Variables

           

          or system variables, but if your production and dev environments are all on the same machine I'm not so sure

          • Re: How to have Different Server Name in NPrinting document
            Daniel Jenkins

            Hi Kuldeep,

             

            Using Environment Variables would be the way to go. See: How to create Separate NPrinting Development Environment

             

            HTH - Daniel.

              • Re: How to have Different Server Name in NPrinting document
                Kuldeep Rana

                Hi Daniel,

                 

                Saw your explanation provided in the Post. It is Clear and I understood that we could define an Environment Variable inside the .nsq and then Change the Value of the Variable based on Test Server Deployment or Prod Server Deployment.

                 

                But, isn't it Similar to my Present Manual approach of changing the Path? I still need to Manually Change the Environment Variable by opening the individual .nsq which is still an Overhead.

                 

                As I asked in the Question

                "if there is a way by which I could use ComputerName() and then Variables to store the above paths then kindly suggest."


                Also, Thanks Thomas for the response.


                Thanks.

                Kuldeep.

                  • Re: How to have Different Server Name in NPrinting document
                    Ruggero Piccoli

                    Hi Kuldeep,

                     

                    No, Daniel's solution that uses Environment Variables in not similar to a manual approach.

                    If you have many connections in a manual approache you need to change all them manually one by one. With Daniel's you use the variable in all connections so you need to change only the variable value one time.

                     

                    Environment variables are also very useful for templates. In Qlik NPrinting 16.* templates are files saved on a filesystem, so there is a path that can be created with EV and it could be different from development to production server. Thanks to EVs you will need to change only few variables (maybe only one) when moving templates from a server to another.

                     

                     

                    Best Regards,

                    Ruggero

                    ---------------------------------------------

                    When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.