Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Partner
Partner

Nprinting API and OnDemandRequestFilters

Hi All,

Has anyone used OnDemandRequestFilters JSON object? I tried multiple ways:

{\"filters\": { \"additionalFilters\" : [ { \"ColumnName: value\" } ] } }
{\"filters\" : { \"additionalFilters\" : [ { \"ColumnName\": \"value\" } ] } } with this syntax request is getting failed.
{\"filters\" : { \"additionalFilters\" : [ {\"Nprinting filter ID\" } ] } } filter ID like "xxxxxxxx-a922-4135-aaad-xxxxxxxx"
but nothing works. looking forward for help from the experts.

Additional Info: we are trying to implement on-demand report generation from mashup portal in .net code. I am able to create the session and on-demand request, report is also getting generated (downloading all data) but we are stuck at passing filter value(s). I tried to pass the filter value selected in mashup using "selections" property but that didn't worked after that trying to use "filters" that is also not working.

Please let me know if any more details required.

Regards,

Tauceef

Labels (2)
5 Replies
Partner
Partner

Re: Nprinting API and OnDemandRequestFilters

Hi @Ruggero_Piccoli

Replying to your post:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-REST-API-and-OnDemandRequestFilte...

would you please explain more on this

"In the additionalFilters  parameter of OnDemandRequestFilters you must insert the ID of existing Qlik NPrinting filtrers in the app you are using."

In the 3rd point mentioned above I have already tried passing filter ID using syntax shared above but it is not working for me.

Regards,

Tauceef

Employee
Employee

Re: Nprinting API and OnDemandRequestFilters

Hi,

You must create the filter, for example by using the Web Console. After storing the filter in the Repository it will have a unique ID and you must insert that ID in the parameter. The filter must be related to the same app of the report you are requesting.

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.
Partner
Partner

Re: Nprinting API and OnDemandRequestFilters

Hi Ruggero,

Exactly what we are doing but it's not working for us, report is getting downloaded with all data.

I tried "OnDemandRequest.selections" as well but that also is not working, all data is getting downloaded. below is the JSON code what we have used, if you could review and share your comments:

string json = "{\"type\" : \"report\"," +

"\"config\" : { \"reportId\" : \"xxxxxxxx-a922-4135-aaad-xxxxxxxxxxxx\",

\"outputformat\" : \"xlsx\"},

\"selections\" : [ { \"fieldName\" : \"Client\",

\"selectedValues\" : [ { \"Clientname\" } ]

    } ]

}";

Regards,

Tauceef

Employee
Employee

Re: Nprinting API and OnDemandRequestFilters

Hi,

Test by adding all fields in FieldSelection. Refer to  https://help.qlik.com/en-US/nprinting/June2019/APIs/NP+API/index.html?page=76

If this doesn't solve please open a support ticket. 

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.
Partner
Partner

Re: Nprinting API and OnDemandRequestFilters

Hi Ruggero,

Thanks for your support and assistance, I have logged a case hope to get the solution soon.

will post if I get any solution.

Regards,

Tauceef