Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Nov 4, 2015 10:58:43 AM
Nov 4, 2015 10:58:43 AM
To execute this tutorial you must have QlikView Server and Publisher installed and running. You need also NPrinting Server. Of course, you need related licenses.
In this tutorial you'll learn how to schedule the reload of a .qvw in QlikView Server and then distribute reports based on it by using NPrinting only if the reload finished successfully.
This is an advanced tutorial that requires a good knowledge about developing solutions using NPrinting. We'll use examples from the NPrinting Training environment.
In the "Distribute" tab set C:\ProgramData\QlikTech\Documents as distribute folder and select "All Authenticated Users" in the drop-down menu. Use this document in the source connection of the NPrinting project.
It's very important that you know the tutorial "How to Execute NPrinting Reports by External XML" Request very well.
In the folder C:\NPrintingTraining\ExternalRequestsXML create the text file QVS.processed. The code to insert is:
<?xml version="1.0"?>
<schedules>
<schedule file="C:\NPrintingTraining\NPrintingFiles\NPrintingTraining.nsq" type="job" entityName="Send a Report via Email" />
</schedules>
This will run the job "Send a Report via Email" that must be present in the .nsq file. To create a job refer to "How to Create Jobs"
In the folder C:\NPrintingTraining\ExternalRequestsXML create the file QVS.bat with the code:
move C:\NPrintingTraining\ExternalRequestsXML\QVS.processed C:\NPrintingTraining\ExternalRequestsXML\QVS.request
It will rename the QVS.processed file to QVS.request. When the NPrinting Server find a .request file in the External Requests folder it will execute it.
Click on the green "+" (plus symbol) button on the right corner to create a new task
When activated this task will run the script we saved in QVS.bat
In this way you'll trigger the task to start after the finish of the reload and only if it ended successfully. This task runs the QVS.bat file who rename QVS.processed to QVS.request so NPrinting Server starts to distribute the reports.
I have not implemented it yet. We try to write a powershell-script to execute it because our Servers run on Windows server 2012 R2 Standard