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: 
Senor_Dai
Partner - Creator II
Partner - Creator II

On Demand API Working but not passing user selections

Hi,

 

I'm successfully able to trigger on OnDemand Report using the API from a Javascript action using the following code :

function(){   

var data = JSON.stringify({"type":"report","config":{"reportId":"87d35c6-0b10-201p-edf5-7239562219e2","outputFormat":"PDF"}});

var xhr = new XMLHttpRequest();

xhr.open("POST", "https://mynprintserver.com/api/v1/ondemand/requests");
xhr.withCredentials = true;
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
 
  }   

Can any help with the code for passing any user selections across also? 

 

Many thanks,

 

Dai

Labels (2)
2 Replies
Andrea_Bertazzo
Support
Support

Hi Senor_Dai,

Did you try with this API?

https://help.qlik.com/en-US/nprinting/November2020/APIs/NP+API/index.html?page=34

An example can be found in this post:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/Nprinting-on-demand-API-with-JQuery/td-p/13...

I hope it helps

 

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up ! 🙂
Senor_Dai
Partner - Creator II
Partner - Creator II
Author

Hi, thanks for the response - but I cant see any definitive way to pass user selections to the OnDemand Request from these examples - Unless Im missing something

 

Dai