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: 
wlau
Contributor III
Contributor III

Dimension Limits Not Applied

I have an NPrinting Excel report template that points back to a straight table in Qlik Sense.  The straight table has dimension limits turned on for one field.  I want to see the bottom x of random records.  The value for the dimension limits is controlled by a slider.  If the end users changes the slider value to 10, then the straight table adjusts accordingly which is fine.  And if the user right clicks on the straight table and exports the data directly to Excel, that works too.  I see 10 records.  However, if I use the On-Demand button to send the data to NPrinting, the NPrinting report will disregard the dimension limits and show all the records.

While researching the problem, I came across a post suggesting that a report filter be created but provided no example.

I am not sure how that would work in my case because I am dynamically creating a record count in my chart.  Here's the expression:

IF(rowno(total) <= $(v_Slider_Value), Sum(RecordCount), 0)

The column in the straight table will have these values, 1,2,3,4,5,6,7,8,9,10,0,0,0...0 but I have the chart set not to show 0 values so only the first 10 records will be shown.

The RecordCount is a field in the database table.  It only has one single value, 1.  I used that to count the number of rows in a table.

Labels (2)
6 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It is very straight forward thing to explain.

1. You are not using slider to control numbers of records... Instead you are using slider to change variable value which is controlling number of records in your table. 

With that in mind the piece which is not working is the value set by user in variable. This is working as designed and you cannot do anything about it. Variables are simply not passed via OnDemand as part of the Qlik Sense application state set by user. 

The same is described here: 

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/Variable-in-on-demand-QV-don-t-change-value...

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/On-Demand-in-Qlik-Sense-dynamic-name-of-the...

 

The workaround is to create a field with values in your data model and use regular selection to control dimension limits values - not ideal but will work.

 

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

I replaced the variable in my expression with a hardcoded value '30' and it looks like this:

IF(rowno(total) <= 30, Sum(RecordCount) , 0)

No change at all.

I looked at all the fields in my chart for any references to variables, and there were none.

wlau
Contributor III
Contributor III
Author

I went through my straight table and removed all references to variables.  For only one of the dimension fields, I set the limitation to "Fixed number" and added a small value like 15 so my report is showing the top 15.  

I exported the report via On-Demand, and still I am getting a report with more than 15 records.

 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

If that is the case we would need detailed description on how you have built your report. Screenshot of your table in Qlik Sense, expressions used  and especially the way you implemented it in your NPrinting report (NPrinting report template screenshots)

If your table was used simply as a straight table and was not in level, page then it should work. If it doesn't - then don't know. 

Ideas:

  • Did you regenerate metadata after you applied all changes. This seems to be obvious, but better check that too...
  • What is your Qlik Sense version? Is it supported (meaning the same or newer release than your NPrinting)?

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

I've attached a file with screenshots and it also contains answers to your questions.

wlau
Contributor III
Contributor III
Author

I rebuilt my Qlik app and instead of using a variable for the dimension limit, i just hardcoded a value in there.  Tested it and exported the data to NPrinting.  I saw exactly the same number of rows in NPrinting as I did in QS.

Now the question is how can I apply dimension limits in NPrinting without using variables?

I went through the link above that showed how I could save a field value to a variable and pass the variable as a report filter but how do you limit the number of rows based on a variable?