- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nprinting HTML - How change background color based on the data from field or expression?
Hello,
I'm working on the embedded HTML report. I built HTML table and add necessary styling, one problem is background color for rows in the report. Customers wants see different background based on data in the table. In Qliksense script I created condition that determine color, but I don't know how apply it correctly.
First I created formula with ColorCode as calculation but it breaks structure of my table if I have more than one row in table, so I can use this way only for header.
Then I added ColorCode field in my table and tried to use it as parameter for styling, but it doesn't work.
Is it possible to make background color dynamic?
Thanks,
Vitali
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
have you inspected a result of you html? How is your colour values passed?
did you encode your HTML? in properties of the field you are trying to pass as html colour value (see screenshot)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I suppose you cannot add the Qlik Sense table as an image.
Could you add some screenshot of the template and the HTML code you are using? I would to understand better and try to reproduce in my installation.
What version of Qlik NPrinting are you using?
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
Hi,
Thank you for help.
Below you can see example of report and html code in attachment.
I use Nprinting November 2018.
Thanks,
Vitalii
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
have you inspected a result of you html? How is your colour values passed?
did you encode your HTML? in properties of the field you are trying to pass as html colour value (see screenshot)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lech, thank you for solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does it work though? Did you test it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it works as I need.
Thanks,
Vitalii