Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've created an NPrinting HTML report that contains an HTML table based on a straight table in Qlik Sense. It works fine. Now I would like to hide one column in NPrinting based on a condition. I created a formula that returns an HTML row if the condition is met, else an empty string:
=If(Include='bh', '<td style="border-collapse:collapse;border: 1px solid;text-align: left;">%%Site%%</td>','')
But the result, in an email, is all messed up.
Is this possible in an HTML report or do I need to use PixelPerfect instead?
Note that I'm on NPrinting Feb 2024 SR3 but that's not an option in the dropdown menu.
Hi, hard to know without seeing an example of what's happening, just guessing that maybe you also need to set the condition on the tr (and th if used) so everything fits.
It has passed a long time since the last I did but it's possible to set conditional columns, I don't remember exactly how I did it, and I don't have access to check it now, but it's possible with html reports.
Hi,
My solution to this is to create whole html in the table and create content by passing it to template.
See this blog post to get an idea about the approach:
https://nprintingadventures.com/2020/04/24/how-to-build-html-pivot-table-in-nprinting/
once you read through this you will see that it is possible to move whole logic into content of the cell which we then pass without html encoding. That would be the approach I would use. Table in post meant to mimick pivot table making it a lot more complex. Straight table approach is much simpler in that regard so it should be relatively easy.
cheers
Thank you, Lech. That looks like a great solution and I will try it out soon(ish).