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: 
mjperreault
Creator
Creator

Cannot Apply Filter Filters NPrinting

Hi All,

 

I have an NPrinting Excel Report which uses a simple table object from Qlik Sense which uses three filters and when I try and generate the report I get the below error.

Reorg.png

 

When I remove any one of these three filters I am able to generate the report. 

When I have these three filters applied in Qlik Sense my table is empty but I would still expect NPrinting to generate an empty report with just the column headers.

I am using Nprinting February 2019.  

Thanks,
Mark

 

Labels (2)
1 Solution

Accepted Solutions
Frank_S
Support
Support

@mjperreault 

Can you identify exactly how you are generating the report? I assumed you are trying to preview the report with your template editor? or are you using On Demand with Qlik Sense to generate the report? Please share the exact steps to reproduce ie: whether it's a report preview, publish task or on demand report...thx.

You 'might' have conflicting filters. 

Check the following that you aren't using the same dimension in two places at the same time. For example if you are previewing a report and you are using an 'object' filter in the template editor ie: city = Paris. Then you also use report filter with the same dimension but with a different value ie: city = Seattle, this will cause a conflict as per the bolded bulleted section below:

See filter rules: 

https://help.qlik.com/en-US/nprinting/April2019/Content/NPrinting/ReportsDevelopment/Static-dynamic-...

Qlik NPrinting filter rules provide predictable behavior with a limited number of options.

  • Formulas are evaluated first, in order to have static values to manage.
  • Filters will not necessarily overwrite past selections. There is no strict hierarchy.
  • Each filter will be analyzed in sequence: task -> user -> report -> object.
  • The values of filter fields at different levels will be intersected.
  • If the intersection gives an empty result, the filter chain will become invalid.
  • There is no limit to how many task, report, object, or users filters you can apply in an app. However, only one object filter can be applied to a single object.
  • If the application of a filter results in an impossible selection, a specific error is returned: "Cannot apply filter {0} to current document data. Requested fields with evaluates are: {1}",

Hope this helps...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

6 Replies
Frank_S
Support
Support

@mjperreault 

Can you identify exactly how you are generating the report? I assumed you are trying to preview the report with your template editor? or are you using On Demand with Qlik Sense to generate the report? Please share the exact steps to reproduce ie: whether it's a report preview, publish task or on demand report...thx.

You 'might' have conflicting filters. 

Check the following that you aren't using the same dimension in two places at the same time. For example if you are previewing a report and you are using an 'object' filter in the template editor ie: city = Paris. Then you also use report filter with the same dimension but with a different value ie: city = Seattle, this will cause a conflict as per the bolded bulleted section below:

See filter rules: 

https://help.qlik.com/en-US/nprinting/April2019/Content/NPrinting/ReportsDevelopment/Static-dynamic-...

Qlik NPrinting filter rules provide predictable behavior with a limited number of options.

  • Formulas are evaluated first, in order to have static values to manage.
  • Filters will not necessarily overwrite past selections. There is no strict hierarchy.
  • Each filter will be analyzed in sequence: task -> user -> report -> object.
  • The values of filter fields at different levels will be intersected.
  • If the intersection gives an empty result, the filter chain will become invalid.
  • There is no limit to how many task, report, object, or users filters you can apply in an app. However, only one object filter can be applied to a single object.
  • If the application of a filter results in an impossible selection, a specific error is returned: "Cannot apply filter {0} to current document data. Requested fields with evaluates are: {1}",

Hope this helps...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
mjperreault
Creator
Creator
Author

My issue seems to be related to this article. Apparently it is the designed behavior, I was confused because this had worked for me in a prior NPrinting version, we had upgraded recently.  

https://support.qlik.com/articles/000053754

 

To work around I created my filtering directly within my object in Qlik using Set Analysis.  The problem I have with this is I believe it reduces flexibility within NPrinting, my Qlik sense objects have to be very specific as opposed to being generic and allowing NPrinting to do the filtering. Oh well.

 

Thanks for your response!

Frank_S
Support
Support

Hi @mjperreault 

If you upgraded from a version of NPrinting Prior to April 2018 (in the NP 17+ platform track and not NP 16 which is separate platform with different possible outcomes), the original NP 17 + platform default behavior is indicated in the image below in black. Also if you upgraded as mentioned, you should simply be able to switch...as mentioned in the article to the option highlighted in 'Red' to allow the report to continue even if there is no data in the chart. 

I also updated the article that you mentioned in your last response, to include this image below. I am also getting further clarity from R&D regarding the article and will update that accordingly. But essentially if I understand you correctly, you should be able to still produce the report:

1. If the rules I mentioned aren't broken

2. You enable the "Generate report. Invalid content will be replaced with placeholder images." option on your report. 

Thanks for your response @mjperreault!

 

Error handling.PNG

 

 

 

 

 

 

 

 

 

 

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
mjperreault
Creator
Creator
Author

The feature functionality does not work for me.

In Qlik Sense I have a table of Transactions with zero filtering or set anaylsis.


In NPrinting I have the table in an excel report and want to apply two filters.  1 Filter is "Last 90 Days" which is a boolean field in my Transactions table calculated based on Transaction Date and the other filter is for a specific Product = 'Shoes'.  In NPrinting if I apply both of these filters I get the Cannot Apply Filters error because there were no Shoe transactions in the last 90 days.  This is the case even when I use the new Generate Report setting. 

In NPrinting 17.3 when I run the same report with the same set of data and the same filters I get an empty report with just the column headings. 

 

What I had to do to get this working in NPrinting February 2019 was change my Transaction Date column to  If([Last 90 Days = 'True',[Transaction Date]) and exclude null values.  Then in NPrinting I only apply the filter for Shoes and I am able to generate a blank report.

I had some difficulty understanding the Rules you mentioned for the NPrinting filters.  Is my combination of filters considered to be an "Illegal Combination".

 

Thanks,
Mark  

Frank_S
Support
Support

Hi Mark 

It sounds like you 'may' be encountering a different limitation with regards to the use of a formula which results in an array of values ie: last 90 days (which appears to be a 'range' of values).  NPrinting is by default at the moment only able to evaluate to a single value rather than a range of values...I think that this is what 'may' be occurring in your case.

https://help.qlik.com/en-US/nprinting/April2019/Content/NPrinting/ExcelReports/Formulas.htm

'Formulas used in Qlik NPrinting must evaluate to a unique value'.

To be honest, all thing equal, I'm not certain what would have allow this to work in 17.3 version. But, if you feel this is a bug and you aren't using an array of value formula as a filter, then please do submit this to the Qlik Support desk or your Qlik Support partner.

Have a good weekend...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
mjperreault
Creator
Creator
Author

Thanks for your responses Frank. Last90Days is not a range of values it is a boolean field (True or False).  At the end of the day I have an acceptable workaround. 

Thanks again,
Mark