Field Colours Not showing when Report is Emailed

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I am not sure if other have experienced this issue.  I have a HTML enable field I am using to show coloured fields in one of the report.  However, when I email the report, (obviously I get a copy too), these colours disappear and only show the value that was used to format the report.  Is there any way around this to show the report just as it appears in QB? 

Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,422 Points 50k badge 2x thumb
When you say "coloured" field ( and btw, thank you for spelling that "correctly" with the Canadian and Australian spelling), do mean an icon stored locally within your own app.  If so, then the issue is that outside non users or even users who are not logged in will not be able to see these icons.  (Or=f course if you use the icon from the std QuickBase Library here https://login.quickbase.com/db/9kaw8phg?a=ShowPage&pageid=134 , then that is not a problem as that app is open to everyone on the internet.

The solution is to have your icon stored in a separate app open to everyone on the internet.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks a lot. It is not quite an icon.  I merely created a formula field to evaluate certain conditions.  Then I used this field in another formula field  where I used  Java script to colour the field.  Is this the correct approach?

Case ([RAG Category],"Red","<div style=\"background-color:Red;color:Red;padding:2%;font-size: 200%;width:40\">Red</div>", "Amber","<div style=\"background-color:Orange;color:Orange;padding;2%;font-size: 200%;width:40\">Amber</div>",null)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,422 Points 50k badge 2x thumb
Well, I took a guess at the cause but my comment did not answer your question. I really do not know what that would not work.  Let's see if anyone chimes in wth a Comment or an Answer.
Photo of Neal

Neal

  • 70 Points
Hi Arshad,

When output is html then it can be checked with


view page source of your browser .

Check if your html-report contains your color formatting.

If your html output does not contain your color formatting then it is likely lost and will not be able to show up in output.

I can make one recommendation - to your html formatting to use different font-color compared to background with better contrast. In your example e.g. background color and font-color both are red - which will hide the result. Make background color different than font-color.

e.g.  <div style="background-color:Red;color:black;padding:2%;font-size: 200%;width:40">Red</div>

In the above example background color is red and font color is black.


I will put the above style below to see if this this answer shows the result of above html formatting.

<div style="background-color:Red;color:black;padding:2%;font-size: 200%;width:40">Red</div>

Please note that you can keep escape character \ as it is if is needed in your formula.


Thanks,

Neal

NealPatil @ gmx.com
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks. The only reason I have same colours is to avoid showing the values as it becomes meaningless when you are already colour coding.  I tried to change the syntax but it makes no difference. I still get non formatted report when I email.
Photo of Neal

Neal

  • 70 Points
If View Source does not display your html formatting then it means it is lost while conversion to html.
Photo of Neal

Neal

  • 70 Points
If the data is not required to be shown and if just color is shown in the result then having new formula field showing icon as mentioned by Mark earlier might solve the problem .
It means no html formatting - but use icons for showing result.
Photo of Neal

Neal

  • 70 Points
Red, purple, blue, cyan,green , black, yellow are part of the icons.
Photo of Neal

Neal

  • 70 Points
Photo of Neal

Neal

  • 70 Points
In the above help document there is one example using case statement. It uses  "" when there is no matching text for case statement. Please try to use the following ( i have replaced null with  "" in your formula.)
Case ([RAG Category],"Red","<div style=\"background-color:Red;color:Red;padding:2%;font-size: 200%;width:40\">Red</div>", "Amber","<div style=\"background-color:Orange;color:Orange;padding;2%;font-size: 200%;width:40\">Amber</div>", "" )
Photo of Neal

Neal

  • 70 Points
To avoid any other html formatting problem following formula might be useful which uses just background-color and color tags.
Case ([RAG Category],"Red","<div style=\"background-color:Red;color:Red;\">Red</div>", "Amber","<div style=\"background-color:Orange;color:Orange;\">Amber</div>", "" )
If this works then more tags like padding, width, font-size can be added.
Photo of Neal

Neal

  • 70 Points
In your original formula width:40 is there. Normally I have seen px(for pixels) e.g. 40px might be valid in html. Width:40px instead of Width:40 might work better in browsers.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks.  I resolved the issue by adding icons instead of colouring the field. So this is all good.