2 Replies Latest reply: Jun 28, 2016 10:18 AM by Steve Lord RSS

    Make nprinting output 0 if 0?

    Steve Lord

      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.

        • Re: Make nprinting output 0 if 0?
          Steve Lord

          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.

            • Re: Make nprinting output 0 if 0?
              Steve Lord

              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.)