Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I want to set up a distribution from NPrinting that sends exactly once when a variable in my qvw is set to 1 (which happens when a certain data condition is met in the document). I don't care what time the distribution goes out, just as soon as the variable equals 1. Is there a way to set this up?
Essentially, I want the NPrinting task to refresh the qlikview document every 15 minutes, check that variable, and if it's 1, send the distribution and stop refreshing after that.
We found an answer to this.
We set up a new task/report that saves off an Excel sheet with a single value (null if complete, 1 if not.) We added that Excel sheet into the script as a one cell data island.
The Job now has three tasks
1 - Reload
2 - Run the report with a condition set that if this new field has values, send the report
3 - Run the new report that updates the Excel sheet
This way the report sends up to and including one time where everything is refreshed.
Mike
Using the QMC/QlikView Publisher, you can set up tasks like the following:
In this setup, the NPrinting task will run each time the document runs, but the condition will keep it from actually sending the report out.
I don't understand, how does a QMC control an NPrinting task? And how would this setup stop after one successful distribution?
Hi Nicole,
Won't the second task continue to run every 15 minutes after the variable is set to 1?
It will be useful to know how often the task should run. If it's maximum once a day I suggest adding a second control, say a variable vDateRun which holds the value of the date when the original variable vRun is set to 1
Pseudo code something like:
IF vRun = 1 AND vDateRun = Today() THEN
vRun = 0 // NPrinting will not send out the reports because that's already been done today
END IF
IF vRun = 1 and vDateRun <> Today() THEN
vDateRun = Today() // NPrinting will send out the reports this iteration
// Next iteration the previous IF will be satisfied as long at the vDateRun is still today
END IF
HTH - Daniel.
Hi Bradley,
Nicole is probably referring to this: How to Distribute Reports after Successful .qvw Reload on a QlikView Server with Publisher
HTH - Daniel.
Won't the second task continue to run every 15 minutes after the variable is set to 1?
Good catch, Daniel.
@ Bradley - You can either have one variable that has your check + Daniel's and use that as a condition. Or have two variables (yours and Daniel's) and have two conditions.
This is what I was referring to. I wasn't aware that there was documentation about it, so thanks for sharing!
We found an answer to this.
We set up a new task/report that saves off an Excel sheet with a single value (null if complete, 1 if not.) We added that Excel sheet into the script as a one cell data island.
The Job now has three tasks
1 - Reload
2 - Run the report with a condition set that if this new field has values, send the report
3 - Run the new report that updates the Excel sheet
This way the report sends up to and including one time where everything is refreshed.
Mike