Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Join us for live office hours! Q&A with Qlik on Dec 14 at 10am EST: Refining Reports and Visualizations
cancel
Showing results for 
Search instead for 
Did you mean: 
luciancotea
Specialist
Specialist

Reload an app while an NPrinting report is running

What happens if the source QS app is reloaded while an NPrinting report is running on top of it?

Labels (2)
9 Replies
Digvijay_Singh

As per my experience results will be unpredictable, I have faced this once and I saw mix of old and new data.

Frank_S
Support
Support

If the QS app is reloading and you execute an NP task, designer preview, connection reload etc, you may get:

  • Extended "Generating" status in NP connection if executed at same time as
  • Invalid data if no errors are experienced (since the QS app is not reloaded completely, a preview or task execution will use cached data)
  • The report task might crash if the data isn't cached in the NPrinting connection.

Suggest scheduling your QS and NP reload activities outside business hours where possible.

Specify NP trigger schedule option within the NP connection to run 'after' the QS app reload completes.

 

To automate the process, you may wish to use NP API's.

You can add the API code to the QS load script to trigger an NP connection reload 'after'. The script can contain code to then execute a publish task 'after' the NP connection.

 

For more information see.

 

Kind regards...

We are just 'like' you and like to be liked when providing a helpful answer. You may also press the 'Solution Accepted' button if an answer provided resolves your question or issue... Cheers!
luciancotea
Specialist
Specialist
Author

Thank you for the detailed answer. Unfortunately, there are multiple users and the app is reloading automatically when there's new data, there is no way of sync app reload with NP requests. The NPrinting reports cycle and generates multiple files, takes more than 30 min.

 

So, if the NPrinting report is half way through and the QS app is just refreshed, are you saying that it should not fail, as the NPrinting runs on the cached data on the NP connection?

 

For how long is that data kept in the NP cache?

Ruggero_Piccoli
Employee
Employee

Hi,

Qlik NPrinting connection caches do not contains all data of the source apps. They contains the first 1000 distinct values of each field, the list of available fields, objects, etc. It cannot be used in the way you think (creating reports with data from caches instead that from Qlik Sense).

One of the best practices we always suggest it to create an app dedicated only for reporting. Using two apps, one for users and one for reporting, will avoid the issue you mentioned and you can optimize the reporting app by loading only the data used for reporting and only the objects used in reports. You will be able to schedule the reporting app data reload when Qlik NPrinting is not generating reports.

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.
luciancotea
Specialist
Specialist
Author

By users, I meant the NewsStand users that are scheduling the NP reports for themselves, they wouldn't know when the source QS app is reloading.

So, I think you are talking about NP connection metadata, not data cache.

 

Question stands: what happens (should happen) when the source QS app is reloaded during a long NP report generation? Is there a standard technical approach or just a friendly advice "don't do it!"

Under QlikView, there was an option on the server to keep a copy of the app in memory if it was used or drop it immediately. Don't have access to QS or NP servers, so I'm turning to the community.

Ruggero_Piccoli
Employee
Employee

Hi,

Yes, I was speaking about Qlik NPrinting connection metadata.

First you have to reload the Qlik Sense app and only after that reload is finished you can start the Qlik NPrinting publish task to generate reports. During the report generation you cannot reload the Qlik Sense app because that could generate reports with inconsistent data. In short: "don't do it!".

So my suggestion to solve is to create a Qlik Sense app only for reporting that can be realoaded when report generation is stopped.

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.
luciancotea
Specialist
Specialist
Author

Yes, it is an app designed for NP only. The thing is that it is reloaded automatically and the NP NewsStand users don't know when that happens.

My expectation would be for the QS server to keep the current app instance in memory for the existing connections  (NP report) and offer the app live user an option to 'refresh' to the new instance, just like the QlikView server did.

Ruggero_Piccoli
Employee
Employee

Hi,

You have to schedule the Qlik Sense app reload in order to avoid that it runs during the Qlik NPrinting publish task execution to avoid inconsistent data on the generated reports. The Qlik NPrinting publish task will send the reports to the NewsStand and related users can read latest available version, and, if you configured it, the historic versions of the same report. Reports in the NewsStand are not generated when a user opens it, they are generated by the publish task. If enabled users can create custom schedules but in this scenario maybe it is better to disable this feature to avoid that users create a custom schedule that runs during a Qlik Sense app reload. 

You can also try to reduce the reports generation time by optimizing the Qlik Sense app and the structure of the templates or you can use Qlik NPrinting APIs https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/Extending/Intro-Extending.htm to run the task after the reload finished.

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.
luciancotea
Specialist
Specialist
Author

Thank you, Ruggero, for trying to suggest workarounds for this issue. Before I change the user way of work, I'm trying to see if there is indeed a technical problem and maybe find a technical solution.

It is strange that I can't find what happened in QS with the old "Allow only one document in memory" setting under QV.

Qlik decision not to have free versions of the software (with limitations) is ... limiting 🙂