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: 
Clevano
Contributor II
Contributor II

NPrinting variable not showing all possible values

Hi,

I have a simple data model with customer.name, customer.type, customer.country and sales data. In a specific benchmark report I need to select a customer, and show data from customers that have the same customer.type, but  having the same or additionally selected countries. For example I select customer A  who is customer type X from country Belgium,  and then I select Belgium (that was white), and also France and Germany (greyed out but still I select them). In Qlik Sense formula '=GetFieldSelections([Customer.Country], ', ', 8)' shows 'Belgium, France, Germany' but in NPrinting it shows only Belgium. I tried the NPrinting Variable (taken from Qlik Sense), I tried the NPrinting formula with the same syntax, I even tried the NPrinting Image which refers to a text object in Qlik Sense, all only showing Belgium, ignoring France and Germany. Any suggestions please? 

NPrinting MAy 2023; Qlik Sense Enterprise for Windows May 2023

 

Labels (1)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Clevano 

So i just did a quick test and indeed it behaves as i thought:

In the screenshot on left you see that i have selected:

  • Customer (2015,2016,2017)
  • Product (Product 1)
  • In Qlik Sense GetCurrentSelections() returns: Customer (2015,2016,2017) and Product (Product 1) - we can also see that because of Product 1 selection my Customers 2016 and 2017 are greyed out (but they are still selected)
  • Now when we run NPrinting OnDemand from that selection it only applies "possible/green" data as filters, which significantly changes context of current selections state, because you cannot show now "Excluded" values by using E() in set analysis.

Lech_Miszkiewicz_0-1692865540929.png

 

Now, this is only OnDemand functionality issue as applying such combination of filters directly as report or task filter produces expected results.

@Clevano - as @Ruggero_Piccoli mentioned this is all what we know here about it. I think you may need to open support ticket with Qlik to get more answers as it would be assigned to engineer who would be able to answer more about questions regarding selections state passed through via OnDemand Qlik Sense extension/component. 

as to actual workaround - well there would be definitely possibility of  getting it done, but it would involve complete change of your data model, where fields you apply selections on would be loaded as island fields so there would be no association on them hence values would not be excluded when selection is being passed.

 

cheers

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.

View solution in original post

13 Replies
Clevano
Contributor II
Contributor II
Author

I think it's not only about showing the variable 😞  

When in a table I use below formula in Qlik Sense, it takes data from the selected countries (Belgium, France and Germany). In NPrinting, the table shows the results taking data from Belgium only. So I think NPrinting is not capable of handling data that's basically excluded from selections.

Is this documented somewhere?

Formula in straight table:

=rank(Sum({<[customer.type] = p({$} [customer.type]), [customer.name] = >} [Salesline.Amount_EUR]))

this gives different results in NPrinting compared to Qlik Sense ☹️

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Clevano , 

You are not mentioning it, but I am 99.9% sure you relate to situation when you apply those filters using Qlik Sense and then you execute report using OnDemand NPrinting qlik sense extension and generate report - is that the case?

If it is then I am afraid this is working as designed as selection passed to NPrinting is based on "Possible" and not "Selected"values.

 

Or...

do you actually create a NPrinting filters directly in NPrinting?

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.
Clevano
Contributor II
Contributor II
Author

Hi Lech,

Thank you for your reply.
You're right the use case is an OnDemand report. 
Do you know where we can find the documentation about selection passed to NPrinting ?

Kind regards,

Bruno.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Bruno @Clevano ,

I dont have any written documentation on that subject, however I know that this was the case  in the past and I was able to preview it in Chrome Developer Tool. 

@Ruggero_Piccoli - do you have any documentation on that. The scenario described in this thread is valid and quite unique and I understand where @Clevano comes from. Use of Qlik engine power with this use case is actually quite common - I was lucky I was not asked to deliver NPrinting on top of it so I did not have to find a solution.

  • So the bottom line is: Is there any documentation on what selection state is being passed with OnDemand NPrinting call? 
    • is it current selection state? which in some cases can show excluded values (for example with E() in set analysis)
    • or is it only "possible" state which basically only passes through to NPrinting only "green" (selected and possible) values from selection state. 

Thanks mate - Ciao!

 

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.
Clevano
Contributor II
Contributor II
Author

Thank you @Lech_Miszkiewicz for clarifying the issue.

I must admit I was taken by surprise when the NPrinting report did not show the same results as in Qlik Sense. My confidence in the NPrinting output was on a level that I only discovered this issue after a while when the NPrinting report was already in production 😞   
So now I feel I that NPrinting is not just about putting the content from Qlik Sense in reports, it's also about checking the content if it matches the Qlik Sense content 😞 

I'm realistic enough to not expecting a quick solution here, (although you never know some workaround?) , but as Lech stipulates, it would be good to have some documentation to rely on. 

 

Thanks,

Bruno.

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Bruno,

well - I dare to say - it depends, but yeah - it is not as simple as "what you get in Qlik Sense you get in NPrinting". There are things you need to consider and plan for:

  • Current selection - based on your OnDemand example you see it is not as simple as it seems. On the other hand if you would apply those selections as filters directly in NPrinting you would get results as expected. So understanding that it is not really NPrinting issue but OnDemand NPrinting Qlik Sense extension issue passing the selection state to NPrinting when generating report would make your life easier as you would already plan for it when designing your solution.
  • The above problem is also a result of more advanced set analysis formula used in expressions (usually going against current selections state). There are other ones as well like:
    • There are other examples like calculating ratio vs total, for example: Sum(Sales)/Sum(Total Sales). Below expression will work ok in table but as soon as you try to use it in Level (for example to build excel table) then applying Level selection will change content of your "TOTAL" and you will get 100% for every row.
    • Using set analysis to show data in table against dimensions which are excluded from selections and using that table as level - this will cause error as levels are like selections and since you cannot apply selection on value which is excluded from your current state that will result in error.
    • more others very specific situations - all dependant also on report template (excel levels work different than pixel perfect levels) etc..

Bottom line is: NPrinting is advanced enterprise class reporting tool which requires experience and training. Misconception that it is as simple as drag&drop to create reports is cause of most of the issues I came across when answering questions here on community or directly with my clients.

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

@Lech_Miszkiewicz I'm looking for the information.



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.
Clevano
Contributor II
Contributor II
Author

@Lech_Miszkiewicz  

@Ruggero_Piccoli 

Dear Lech, 

Dear Ruggero,

 

First of all thank you Lech for the much appreciated comments. I will for sure take some closer look to the outcome of my reports when I develop them. 

Now is there any chance to deliver a solution in NPrinting for below scenario?

- A sales person wants to print a report for this or this customer --> selects a customer in Qlik Sense.

- the sales person wants to see the sales for that customer, but also he wants to compare these sales with the sales of customers that have the same customer type, but not only from its own country, also from some other (selectable) countries. 
This way the sales person will take the report with him while doing a product tour with the client, and for instance he 'll see that his customer is not buying much from productline X, while productline X is doing very well at comparable customers. 

Should you have hints to build a solution for this scenario, I'll be glad to hear . If not possible, then at least I have asked 🙂 

Thank you,
Kind regards,

Bruno.

Ruggero_Piccoli
Support
Support

Hi,

The Qlik NPrinting On-Demand for Qlik Sense extension uses the method app.selectionState() to get the current selections which then are sent when a report is requested.

The documentation for  app.selectionState() is at:
https://help.qlik.com/en-US/sense-developer/May2023/Subsystems/APIs/Content/Sense_ClientAPIs/Capabil...

and connected pages.

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.