Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Like the title said; HTML styling like border lines, padding space do not work when "Keep Source Format" is checked.
This is quite an issue when the values are formatted with text colors, bolden font when certain conditions are met and could not be recreated in NPrinting. The Qlik formatting will not be preserved when disabling Keep Source Format.
Has anyone here found a way to get around this?
Hi,
Could you share some screenshots of the template structure?
Are you importing the source table as a single tag? Did you tried to follow @Frank_S 's suggestion and create a native HTML table with borders defined in HTML and inserting Qlik NPrinting column tags in it?
Best Regards,
Ruggero
a native HTML with borders defined is what I created. But the styling defined in the tags won't work until I disable "Keep Source Format".
@Ruggero_Piccoli : do you see any issues with the HTML code? it works if I disable "Keep Source Format" but that will take away the conditional format coming from Qlik on the line items; which I am not seeing a way to create in HTML.
Hi @adang , @Ruggero_Piccoli , @Frank_S
This is my example:
Simple table in Qlik Sense with:
I bring this table to HTML Report and as shown on the picture I use Dimension 1, Dimension 2, and Measure to build my table content and another 2 columns I use to populate style values by passing their respective tags as marked on screenshot:
Please note that for style I had to disable HTML Encode parameter as shown on screenshot
When you preview my template you get this - table where every cell can be controlled conditionally based on values calculated in Qlik Sense.
I said from the very beginning that this requires planning and appropriate design but certainly is possible.
cheers
Lech
Thank you @Lech_Miszkiewicz ! This is something that I had not known about until you showed me how to do it in details like this. I will give it a try and let you know the outcome!
Hi @adang
HTML does not look at line but... there is big BUT....
you can expose value of the colour in line by calculating it in Qlik and passing it down to HTML template as actual colour value.
I wrote whole step by step process on how to achieve this below.
so - yeah, this definitely is possible.
@adang let us know how you go - good luck
by the way - you may be interested in reading this as well - this is completely a whole different concept i wrote on how to utilize nprinting and passing through whole html code using qlik sense measure:
https://nprintingadventures.com/2020/04/24/how-to-build-html-pivot-table-in-nprinting/
cheers
Thanks @Lech_Miszkiewicz for sharing this solution!
Your solution on the line item formatting in HTML works! Thank you @Lech_Miszkiewicz !
About the pivot table in HTML, it's a very creative approach! And I think it's the best approach if you have an undefined list of dimensions.
In this very same project, I found a quick and easy way to get this done. Since I have three specific values for the dimension, I just created a metric calculated specifically to a dimension value, and use <th> tags with colspan style to create a fake pivot table like in the screenshot.