Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
DirkPeterCasteleijn
Contributor II
Contributor II

QS variable as condition in nPrint - reload cache?

hey all,

I am using an variable from my QS app, to populate an condition in nPrinting, which defines whether an report is send out or not.

My variable:

 

let vNprintTrigger = Peek('CountOfInvoicenPrintFlag', 0, NprintTrigger);

 

Basically, this variable indicates the quantity of invoices which meet an specific characteristic. The QS-report loads once a day. If this variable is higher than zero, then the condition in Qlik nPrint changes to 'true':

DirkPeterCasteleijn_0-1615282714931.png

Now, this works all good during testing.

However, I get weird behaviour if the QS-report has reloaded (the next day). After some testing, it seems that the condition in nPrint works correctly only after a reload of the cache of the connection itself.

  • I checked the report in QS - Variable was '2' (thus higher than 0)
  • I ran the report in nPrint --> no result: 'condition is not met'
  • Reload of cache of the connection
  • Ran te report in nPrint again --> report succesfull

Is this expected behaviour, and if so; where can schedule the reload of the cache?

tnx all 🙂

Qlik NPrinting 

Labels (2)
2 Replies
Ruggero_Piccoli
Support
Support

Hi,

The problem is that if data on an already opened Qlik Sense connection changes, Qlik NPrinting will not be aware of this. 

If the Qlik NPrinting server has idle periods of the whole system you could set the option:
<add key="force-unused-resolvers-closure-policy" value="1" />

Instead if the Qlik NPrinting server has idle periods only on single connections you could set the option:
<add key="force-unused-resolvers-closure-policy" value="2" />

Instead if connections are always opened you have to force their close by scheduling a cache reload as you noticed.

The support article https://support.qlik.com/articles/000055501 explain how to change the option.

Best Regards,

Ruggero



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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
DirkPeterCasteleijn
Contributor II
Contributor II
Author

Thank you for the solution you have provided.


Still, i am a bit puzzled; Is the a Qlik Sense Variable part of the connection?  And if so, this basically means then that everytime we use an QS-variable as an condition in nPrint, we should force the reload of the cache?

Moreover: what is ment with 'idle periods?'

  • In QS (QMC) we reload the datamodel of the app once a day.
  • In nPrint we trigger the Published Task also once a day (couple of minutes after the reload of the app)
    Is the connection the rest of the time 'idle'?

DP