<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: QS variable as condition in nPrint - reload cache? in Qlik NPrinting</title>
    <link>https://community.qlik.com/t5/Qlik-NPrinting/QS-variable-as-condition-in-nPrint-reload-cache/m-p/1789982#M31479</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The problem is that if data on an already opened Qlik Sense connection changes, Qlik NPrinting will not be aware of this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the Qlik NPrinting server has idle periods of the whole system you could set the option:&lt;BR /&gt;&amp;lt;add key="force-unused-resolvers-closure-policy" value="1" /&amp;gt;&lt;/P&gt;&lt;P&gt;Instead if the Qlik NPrinting server has idle periods only on single connections you could set the option:&lt;BR /&gt;&amp;lt;add key="force-unused-resolvers-closure-policy" value="2" /&amp;gt;&lt;/P&gt;&lt;P&gt;Instead if connections are always opened you have to force their close by scheduling a cache reload as you noticed.&lt;/P&gt;&lt;P&gt;The support article&amp;nbsp;&lt;A href="https://support.qlik.com/articles/000055501" target="_blank"&gt;https://support.qlik.com/articles/000055501&lt;/A&gt;&amp;nbsp;explain how to change the option.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ruggero&lt;/P&gt;</description>
    <pubDate>Wed, 10 Mar 2021 11:27:09 GMT</pubDate>
    <dc:creator>Ruggero_Piccoli</dc:creator>
    <dc:date>2021-03-10T11:27:09Z</dc:date>
    <item>
      <title>QS variable as condition in nPrint - reload cache?</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/QS-variable-as-condition-in-nPrint-reload-cache/m-p/1789494#M31450</link>
      <description>&lt;P&gt;hey all,&lt;/P&gt;&lt;P&gt;I am using an &lt;STRONG&gt;variable&lt;/STRONG&gt; from my QS app, to populate an &lt;STRONG&gt;condition&lt;/STRONG&gt; in nPrinting, which defines whether an report is send out or not.&lt;/P&gt;&lt;P&gt;My variable:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let vNprintTrigger = Peek('CountOfInvoicenPrintFlag', 0, NprintTrigger);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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':&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DirkPeterCasteleijn_0-1615282714931.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/50697i4AAFA88D1A3EE0A0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DirkPeterCasteleijn_0-1615282714931.png" alt="DirkPeterCasteleijn_0-1615282714931.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, this works all good during testing.&lt;/P&gt;&lt;P&gt;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&amp;nbsp;&lt;STRONG&gt;cache&lt;/STRONG&gt; of the connection itself.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I checked the report in QS - Variable was '2' (thus higher than 0)&lt;/LI&gt;&lt;LI&gt;I ran the report in nPrint --&amp;gt; no result: 'condition is not met'&lt;/LI&gt;&lt;LI&gt;Reload of cache of the connection&lt;/LI&gt;&lt;LI&gt;Ran te report in nPrint again --&amp;gt; report succesfull&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is this expected behaviour, and if so; where can schedule the reload of the cache?&lt;/P&gt;&lt;P&gt;tnx all &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;LI-PRODUCT title="Qlik NPrinting" id="qlikNPrinting"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 09:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/QS-variable-as-condition-in-nPrint-reload-cache/m-p/1789494#M31450</guid>
      <dc:creator>DirkPeterCasteleijn</dc:creator>
      <dc:date>2021-03-09T09:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: QS variable as condition in nPrint - reload cache?</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/QS-variable-as-condition-in-nPrint-reload-cache/m-p/1789982#M31479</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The problem is that if data on an already opened Qlik Sense connection changes, Qlik NPrinting will not be aware of this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the Qlik NPrinting server has idle periods of the whole system you could set the option:&lt;BR /&gt;&amp;lt;add key="force-unused-resolvers-closure-policy" value="1" /&amp;gt;&lt;/P&gt;&lt;P&gt;Instead if the Qlik NPrinting server has idle periods only on single connections you could set the option:&lt;BR /&gt;&amp;lt;add key="force-unused-resolvers-closure-policy" value="2" /&amp;gt;&lt;/P&gt;&lt;P&gt;Instead if connections are always opened you have to force their close by scheduling a cache reload as you noticed.&lt;/P&gt;&lt;P&gt;The support article&amp;nbsp;&lt;A href="https://support.qlik.com/articles/000055501" target="_blank"&gt;https://support.qlik.com/articles/000055501&lt;/A&gt;&amp;nbsp;explain how to change the option.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Ruggero&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 11:27:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/QS-variable-as-condition-in-nPrint-reload-cache/m-p/1789982#M31479</guid>
      <dc:creator>Ruggero_Piccoli</dc:creator>
      <dc:date>2021-03-10T11:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: QS variable as condition in nPrint - reload cache?</title>
      <link>https://community.qlik.com/t5/Qlik-NPrinting/QS-variable-as-condition-in-nPrint-reload-cache/m-p/1789991#M31481</link>
      <description>&lt;P&gt;Thank you for the solution you have provided.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Still, i am a bit puzzled;&amp;nbsp;Is the a Qlik Sense Variable part of the connection?&amp;nbsp; 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?&lt;/P&gt;&lt;P&gt;Moreover:&amp;nbsp;what is ment with 'idle periods?'&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;In QS (QMC) we reload the datamodel of the app once a day.&lt;/LI&gt;&lt;LI&gt;In nPrint we trigger the Published Task also once a day (couple of minutes after the reload of the app)&lt;BR /&gt;Is the connection the rest of the time 'idle'?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;DP&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 11:49:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-NPrinting/QS-variable-as-condition-in-nPrint-reload-cache/m-p/1789991#M31481</guid>
      <dc:creator>DirkPeterCasteleijn</dc:creator>
      <dc:date>2021-03-10T11:49:15Z</dc:date>
    </item>
  </channel>
</rss>

