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: 
stevelord
Specialist
Specialist

Make nprinting output 0 if 0?

Hi, I have an nprinting report setup to output a long list of numbers computed in a qlikview, and a final report excel file that is linked to this nprinting output.  In order for my final report's excel links to line up right, I need nprinting to output a 0 when 0 is the result so all of the following numbers remain on the same rows.  What is the best way to do this?

For now, I'm going to wrap the expressions with something like if(expression=0,'None',expression).  Pretty sure if I try to just say if expression=0,0,expression it'll just come out blank on the output again but I'll give that and '0' a quick try.

2 Replies
stevelord
Specialist
Specialist
Author

Hi, I have a couple of approaches that look promising.

Approach 1> Add an expression that is just 1, then hide that column.

Approach 2> if(expression=0,text(0),expression)

I tried 2 first, but then thought 1 might work better if the 0 comes through as a number for the excel side of things.

stevelord
Specialist
Specialist
Author

Option 1 above worked beautifully.  Insert an extra expression and just put a number 1 for the expression, then go to presentation tab and hide the 1 expression column.  Nprinting output all of my chart objects' visible expression values on all of the outputs this time, and just put 0s where the expressions equaled 0.

This means I will have the same set of rows in the same positions on the nprinting outputs, and the associated files that I link to these outputs will be stable with one set of links.  (And my reporting colleagues will simply hide rows for certain programs that not all clients have.  All 1-time setup stuff.)