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: 
francisco_marti
Contributor III
Contributor III

NPrinting Sept2017: is there a way to trigger a NPrinting task from Qlik Management Console

Hi.

I've got the need to trigger a task in NPrinting once a QMC task is reloaded. It's a task that we reload very frequently during the day.

I could do a task in NPrinting that triggers every few minutes but I think this would cause problems in the performance of NPrinting as the experience with this tool has shown me.

So I need to know if there is a right way to do this.

Recently I've read about this in this article:

STT - Finetuning your NPrinting 17 Deployment

and there it has the same question as me:

Q: Question for 17.4: How can we trigger a NP17 job from QS or QV QMC?

A: currently not available

But I can't believe this is not ready for NPrinting!

Is this really so?

Thank you.

1 Solution

Accepted Solutions
francisco_marti
Contributor III
Contributor III
Author

Finally Qlik made possible to execute a NPrintng task from a .qvw. in NPrinting February 2018.

We used it and it worked out perfectly!:

How To Use NPrinting APIs In A Qlik Load Script

Regards.

View solution in original post

14 Replies
Not applicable

Currently you need to use the APIs.

Here's some documentation and a project:

https://qliktechnologies365-my.sharepoint.com/personal/jil_qlik_com/_layouts/15/onedrive.aspx?slrid=...

Take a look at the event chaining video and slides 9-18.

Best

Aran

francisco_marti
Contributor III
Contributor III
Author

Hi Aran.

Thank you for the quick response.

I can't access to that URL to see the documentation. My user is not allowed to do that:

That didn't work

We're sorry, but francisco.martinez@freixenet.es can't be found in the qliktechnologies365-my.sharepoint.com directory. Please try again later, while we try to automatically fix this for you.

Any suggestion, please?

Kind regards.

Ruggero_Piccoli
Support
Support

I suppose Aran want to share with you the attached document.

Other information about the APIs are on the official help site Extending Qlik NPrinting ‒ Qlik NPrinting

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 as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.



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.
francisco_marti
Contributor III
Contributor III
Author

Hi.

Thank you.

I understand now that there is a way to trigger NPrinting tasks through the NPrinting API.

Please, take into account that we use Qlikview, and we have Qlik Management Console.

If I'm not wrong these are the steps I have to follow from now on:

1.- Make a javascript file with the call to the task id(This file we'll run from (QMC-System-Supporting Tasks-External Program):

- The javascript code:

var xhr = new XMLHttpRequest();

xhr.open('POST', 'https://172.16.12.223:4993/api/v1/tasks/98585114-89e4-4f5b-963a-6ad00c4387ad/executions', true);

xhr.withCredentials = true;

xhr.send(null);

2.- Run the javascript file from QMC

In order to do this we are testing it with Postman, a GET call:

https://172.16.12.223:4993/api/v1/tasks/98585114-89e4-4f5b-963a-6ad00c4387ad

but I always get an {"code":403,"message":"User has no rights to access the resource"},

regardless I have granted access to all the places that are supposed to do:

- users in Nprinting with domain\account,

- Security Roles with all the possible permissions,

- Nprinting-Admin-OnDemandSettings as a trusted site for my server.

- Report with Enable On-Demand and API report generation checked.

Could you help us with this issue?

Thank you.

francisco_marti
Contributor III
Contributor III
Author

I was missing the URL login call in order to log into NPrinting server but we finally get a solution.

I summ up the steps I did:

1. Create a Supporting task in QMC (this depends on the task we want to upload)

     1.1. This task executes the bat file

          1.1.1. Inside the bat: it opens Chrome and call the HTML file

               1.1.1.1. Inside the HTML there is the javascript code that makes 2 URL calls

                    1.1.1.1.1. URL login call

                    1.1.1.1.2. URL POST call to execute the NPrinting task

          1.1.2. The bat file closes Chrome

jchoucq
Partner - Creator III
Partner - Creator III

Hi Aran,

thank you for your informations.

Will external request be a feature on the roadmap of NP17 (like xml request in NP16) or the solution will be necessarily a specific developpement with the APIs ?

Best regards.

Johann

francisco_marti
Contributor III
Contributor III
Author

In NPrinting Feb2018 this procedure is ready to execute from Qlikview script.

https://community.qlik.com/blogs/qlikproductinnovation/2018/02/21/how-to-use-nprinting-apis-in-a-qli...

I tried it and it works perfect!

francisco_marti
Contributor III
Contributor III
Author

Finally Qlik made possible to execute a NPrintng task from a .qvw. in NPrinting February 2018.

We used it and it worked out perfectly!:

How To Use NPrinting APIs In A Qlik Load Script

Regards.

h_prakash
Creator II
Creator II

Hello Sarrion,

Even I tried and it was working in Feb version. we have recently upgraded to April 2018 version. In that we are not able to trigger the app. I am not able to Execute the get the User Section.

I am getting the Following error.

Qlik Sense - Nprinting API Help

Can you please guide me if you have faced simialr situation.

Thanks

Hari