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

Nprinting evaluate filter works in script but not in Nprinting

Hi i think i have asked this before with any success.

there i a bug in the N printing evaluate filter . where it will not accept string concatination with a formula

example this  = 'C' & ceil(month(addMonths(today(),-4)) / 4)

works in qliks sense script and experessions

but does not work in N-Printing

can qlik please fix this i have tried adding the expression in a variable and i get the same error message.

i know its either the ampersand or the string text even if i substitute the ampersand for chr(38) same error.

 

Qlik NPrinting Qlik Sense Business 

 

anwarbham_0-1611250704483.png

the error i get 

anwarbham_1-1611251182566.png

 

 

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

For this kind of filters I usually use Dual() values in script so the values for users still look like C1, C2 etc... but in NPrinting they need to evaluate to number so there is no need for "&" character and filter would be just: ceil(month(addMonths(today(),-4)) / 4)

dual loaded in script:

Dual('C' & ceil(month(addMonths(today(),-4)) / 4),ceil(month(addMonths(today(),-4)) / 4)) as some field

 

again this is only workaround - same as yours

cheers

Lech

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

4 Replies
Frank_S
Support
Support

Hi @anwarbham 

I have verified the same issue using a QlikView application.

I tested with NPrinting June 2020 SR 1 on both the 'evaluate' and 'advanced search' filter type.

Both fail to evaluate correctly.

I will check with R&D and get their thoughts and reply back here soon.

 

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

thanks , my work around was changing the data model to accomidate what would evaluate in the filter box 

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

For this kind of filters I usually use Dual() values in script so the values for users still look like C1, C2 etc... but in NPrinting they need to evaluate to number so there is no need for "&" character and filter would be just: ceil(month(addMonths(today(),-4)) / 4)

dual loaded in script:

Dual('C' & ceil(month(addMonths(today(),-4)) / 4),ceil(month(addMonths(today(),-4)) / 4)) as some field

 

again this is only workaround - same as yours

cheers

Lech

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.
Frank_S
Support
Support

So I got a response from R&D and they suggested using the 'Quarter' rather than the 'month' dimension in my test filter.

Of course that worked...see attached.

quarter.PNG

So complex formulae do work if used with a valid dimension.

If your dimensions are calculated, then moving them to the load script (mentioned be @Lech_Miszkiewicz ) would be a suitable solution to ensure your NPrinting filters work.

Additionally, from R&D
"...what is important in fact is that you insert in the filter an evaluation that calculates a number for values that are numeric and text for the ones that are not. Dual are in fact numeric... Otherwise it is better to pass perhaps to an expression search"

So essentially paraphrasing what @Lech_Miszkiewicz mentioned earlier as well.

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