Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
With the HTML template feature out for SaaS reporting, I was exploring some possibilities which I implemented in my on-premise Nprinting html report. One of which was conditional row colouring in which I created a column in Qlik Sense table that contained color code expressions based on certain criteria.
I then passed this column as an inline style attribute for background color for the column on which I wanted the conditional color to be applied. Here I made sure that 'HTML encode' option is checked for the derived column containing color codes.
I tried to replicated the same scenario in SaaS environment but was unable to do so. Is there any alternate way to achieve this ?
In above example the cell colors green, red and blue are passed as hexcode values calculated in a new column in qliksense for inline style bgcolor attribute for the column weekly returns in Nprinting template
Regards,
Aditya
I am seeing this as the biggest missing component and I already voiced to @Andrew_Kruger that this gap needs to be filled.
As for now-i don know the workaround for this missing feature.
Hi @Lech_Miszkiewicz ,
Thanks for the reply. I tried to achieve this using automation method. but only got so far with the table creation method. I am still unable to conditional color the row.
In HTML reporting though, if you keep source formatting on for the table, the rows are coloured but any other formatting such as borders, etc get overridden.
Do you by any chance know if this is achievable through automation or not ?
Regards,
Aditya
No i dont - I did spend some time using automations before but I have given up. Frankly I feel bit deflated by this. I am reading through the documentation about the HTML designer in SaaS and I see that there are plenty other restrictions as well which were not there in NPrinting (like those: https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Reporting/html-report-al...) so really at this stage I need to evaluate if any of the reports I have in HTML would be suitable for migration at all given the requirements.
I have opened the Idea you can vote on (and maybe ask others to vote as well) so we can get the "HTML encode" feature back. https://ideation.qlik.com/app/#/case/494814?currentProductId=9da99bc1-0dfb-4471-8e12-d23685578c43&pr...(HTML Encode option available for in app HTML Reporting) although I am afraid that it will be denied as you could sneak in using that methof bit of code which is not allowed and gets removed in designer tool.
Anyway - lets see how it goes.
Again thanks for the input !! I noticed that too. Some part of code gets removed due to Qlik's code sanitation functionality.
Regards,
Aditya
Ok So after further digging, I was able to achieve required html report format using automation.
Firstly, drag a "Get straight table data block" in automation and configure it to use required table from qlik saas application
In automation, I used a "variable block" in which I appended color code values to the variable (lets say vColor) using a simple if() statement functionality provided in the "Add Operations" part of the block.
The erased part in red from above screenshot is the column which will contain the distinguishing value to color the entire table row. I then passed this value in circled blue part of the condition. If there are multiple values to be checked for highlighting multiple rows, you can append the values in the same variable. Here make sure to choose append rather than using set as this will override previous value of the variable
Once done with the color variable configuration part, you will need to create an additional variable (lets say vData) which will contain all the columns from "Get straight table data block". Here you can pass the color variable created and configured from previous variable block in the style tag of table html code.
Finally in the mail block, add above created variable (vData) to the body of your mail and run the automation.
Final Output:
My Final Automation structure looks something like this. I have used additiona variable vColorText. But we can ignore that for now.
Regards,
Aditya