Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Now Live: Qlik Sense SaaS Simplified Authoring – Analytics Creation for Everyone: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
mbrouwer
Contributor III
Contributor III

Nprinting API response error message

Is there an option to get more information from  the API after an on demand report has failed?
Would like to see a functional or technical error message.  i.e. No data found for filter combination. Or some other message other than just status = "failed"

We are using:
POST https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=40
GET https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=42

 

Labels (2)
2 Solutions

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

You can use Audit Trail APIs. For example export the audit table as a JSON CSV file https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=11, parse it and retrieve the error messages. 

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.

View solution in original post

Ruggero_Piccoli
Support
Support

Hi @Frank_S ,

I think this could be something like a new feature request, an improvement, to be proposed in https://community.qlik.com/t5/Labels-page/bd-p/Category_Labels?categoryId=qlik-ideas&corenode=boards.... It is not possible for a user to customize the error messages and I don't know if this specific error can be captured when it happens in order to display a more specific message. This need to be evaluated by the developers team.

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.

View solution in original post

13 Replies
Lech_Miszkiewicz

I am not sure if i understand..

since you are using ondemand request data combination should be determined by user selections and results hence you dont need such response from nprinting as you can get one directly from qlik sense either through visualisation or api

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

You can use Audit Trail APIs. For example export the audit table as a JSON CSV file https://help.qlik.com/en-US/nprinting/May2021/APIs/NP+API/index.html?page=11, parse it and retrieve the error messages. 

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

Hi Ruggero,
I have looked at the results of the audit trail. Both event and logs are not logging tomething about the error if a On-Demand-Request has failed.

This is the only thing i get from a event request

  {
                "id""7f27b495-c9b3-4cdd-bf83-ee5184eeee36",
                "userId"null,
                "userName"null,
                "ipAddress"null,
                "source"null,
                "target""OnDemandRequest",
                "targetId""24ac0319-2e42-4ec5-883e-19a2366c4b28",
                "targetName""Vslg Goederenbeweging per artikel (per uitgever)",
                "appId""552589af-e68b-43d3-9b2b-bfceceec4768",
                "eventTime""2022-01-07T14:17:31.726879Z",
                "action""Failed",
                "description""On-demand request '24ac0319-2e42-4ec5-883e-19a2366c4b28' failed for report 'Vslg Goederenbeweging per artikel (per uitgever)'",
                "data": {
                    "format""XLSX",
                    "reportId""813e00fc-b8e2-4b19-b00d-579cddcfbc3e",
                    "reportTitle""Vslg Goederenbeweging per artikel (per uitgever)",
                    "requestSourceType""OnDemand"
                },
                "dataType""OnDemandRequest"
            },
 
And this is the only information within the log request

2022-01-07T14:17:31.726726879Z                       OnDemandRequest.Failed         OnDemandRequest              24ac0319-2e42-4ec5-883e-19a2366c4b28         Vslg Goederenbeweging per artikel (per uitgever)    Failed              552589af-e68b-43d3-9b2b-bfceceec4768                                                    On-demand request '24ac0319-2e42-4ec5-883e-19a2366c4b28' failed for report 'Vslg Goederenbeweging per artikel (per uitgever)'           {"format": "XLSX", "reportId": "813e00fc-b8e2-4b19-b00d-579cddcfbc3e", "reportTitle": "Vslg Goederenbeweging per artikel (per uitgever)", "requestSourceType": "OnDemand"}     OnDemandRequest


mbrouwer_0-1641570269214.png

There should be a way to detmine what went wrong !?

I hope you can help me.

Regards
Marcel

Frank_S
Support
Support

@mbrouwer

 

The error/failure is 'after' sending the API call.
In this case you would want to investigate what the issue with the On Demand report is.

The fact that the report failed based on your API call indicates a possible issue with perhaps the report design, possible locked fields (always one selected or other unsupported QS item) or other filter problem.

 

Try executing the report directly via the QS hub with the same parameters used in your API call.

 

Here is one article that might help...

 

https://community.qlik.com/t5/Knowledge/How-to-manage-Qlik-Sense-NPrinting-On-Demand-quot-Request-Fa...

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!
Lech_Miszkiewicz

I agree with Frank,

This error usually indicates issues with report itself and "Always one selected value" is usually a reason. We keep forgetting about fields which are hidden and set to always one selected values: like toggles, selectors etc...

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
mbrouwer
Contributor III
Contributor III
Author

Thanks Frank and Lech.
Indeed the error is after the on demand request api call. The most common reason why there is a failure of the report is because the user gave a selection (period of time) where there are no facts.
In that case I want to give the user a functional message i.e. "The selection does not provides any data"  or give the user an empty report. But now the user is calling telling that his report failed.

regards,
Marcel

 

Frank_S
Support
Support

Hi @mbrouwer

If it is a 'request failed' message then check the article I sent.

Here it is again for your convenience.

If there is a different error, then that might require a remote session.

Request failed could also be due to unsupported items as well so you should also check your QVF.

 

@Ruggero_Piccoli I don't believe custom messages are possible that @mbrouwer is suggesting correct? Do you have any thoughts about his question? Thx in advance.

 

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!
Ruggero_Piccoli
Support
Support

Hi @Frank_S ,

I think this could be something like a new feature request, an improvement, to be proposed in https://community.qlik.com/t5/Labels-page/bd-p/Category_Labels?categoryId=qlik-ideas&corenode=boards.... It is not possible for a user to customize the error messages and I don't know if this specific error can be captured when it happens in order to display a more specific message. This need to be evaluated by the developers team.

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

That should be very nice. Is will save us a lot of questions from customers and time of our development team to investigate if there is a technical problem or are there simply no facts for the report with the combination of filters given.
Regards,
Marcel