

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
HTML table styling does not work with with "Keep Source Formats"
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?
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @adang , @Ruggero_Piccoli , @Frank_S
This is my example:
Simple table in Qlik Sense with:
- Dimension 1 = Dim1
- Dimension 2 = Dim2
- Measure: Sum(Expression)
- This measure has variable vTextColour set as font/text colour
- This measure has vcariable vBackgroundColour set as cell background colour
- Measure which shows me what is the font/text colour RGB value
- Measure which shows me what is the background colour RGB value
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:
- font color as $(vTextColour) column from my Qlik Sense table
- background color as $(vBackgroundColour) column from my Qlik Sense table
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


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How the chart looks in Qlik
Qlik formatting preserved when Keep Source Format checked; but does not look any good without HTML styling for the border.
Lost all the Qlik formatting when "Keep Source Format" disabled to make HTML styling work

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @adang
If you want more control over your HTML NP report output I suggest using a tool like the table generator found on this site. It is an external link which I found to be safe but use at your discretion.
I use this tool to format my table to make it appear as I would like to see it in my report output
In the template editor
- copy paste the table generator code into the NP template editor.
- Insert the header titles and table data
- remove the 'keep source formats' check box
- use the 'hide' option for the 'show header' property. (This prevents duplicate headers)
See below for a sample of the report design and output.
Hope this helps...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @adang,
What are the conditions which cannot be recreated in NPrinting? I know it may not obvious but as far as I am concerned I was able to do quite a lot with HTML tables.
I understand that there might be additional work required but you should be able to achieve all sorts of conditional formatting by creating CSS syntax directly in Qlik for each corresponding row (and/or cell).
we discussed this here:


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please refer to https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/HTMLReports/HTML-formatting.htm.
"Keep source format" activated tells to Qlik NPrinting to do its best efforts to replicate the original format in QlikView or Qlik Sense. Best efforts in the meaning that it is not always possible to replicate perfectly the original style. This option is active by default.
If you uncheck "Keep source format" original formats are removed and you can customize it by using the native features of the type of template you are developing. For example with HTML you can write custom HTML style code.
Best Regards,
Ruggero
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey thank you for the suggestions! However, I have read that thread before starting this new one.
And here is an example: values in a specific column (metric) represent number of days to complete an order. this order is then tied to a "deliver by" date; and this "day to make" metric will be colored as red or green based on the comparison to the number of day between report date and delivery by date. As far as I know, this conditional formatting can only be done in Qlik. Because the HTML table does not look at the line item level. Putting a table here so that it's easier to show what I meant.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is not helping because as you can see in the screenshots I sent in the initial post, the borders do not show in the HTML table and make a quite messy table.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The issue here is not about creating HTML tables, because as you can see in the 3rd screenshot, it's already done there. However, in order to show the table borders, I had to disable keep source format, which made the value loose conditional coloring on the text value.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I understand what you want to have but you cannot "partially disable" the "Keep source format"; you have it enable, so the conditional format of the number works, or you disable it and loose all formats. The "Keep source format" enabled does its best efforts to replicate the Qlik Sense formats but it could be not not able to do everything in some cases and HTML has not advanced features to format the output like Excel for example.
You could try to export the original table as an image instead of an HTML native table. Are you developing an HTML report to embed it in the email body? What is your final goal?
Best Regards,
Ruggero
Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes; it's an HTML report. I have got to the part where we could publish the data in text with HTML tables. However, there's a requirement that the values need to be color-coded so that it'd be easier for the recipients to identify where the issue is. And this is where I am stuck.
This is not a problem, if we could have an option in Qlik to force the HTML column to show borders. But that's not an option right now I feel.

- « Previous Replies
-
- 1
- 2
- Next Replies »