A while back i added some color formatting to a calculation and it worked fine then one day it stopped working. I abandoned the idea for a while but am now revisiting it. I am using this calculation:
concat('<font color="', if(${pf_single} = 'F', 'red', 'black'), '">', if(${pf_single} = 'P', 'P', if(${pf_single} = 'F', 'F', '-')), '</font>')
to color Fails in red and the rest in black. it lets me save and even publish and works in the survey on connect however when i try and send a real survey i get a database error. the idea is to have the coloured F pull through to a report. Any one had this issue before with coloring a calculated field?
You have a lot going on there. For starters, I'd not nest IF() statements inside a concat(). Make them their own calculate fields and reference those.
If you do this you will forever have html in your data and it will drive you nuts. Do not recommend.
I would try adding a second value that is just the color and hide it in the form then use in the report. Not sure if reports can do color?
ok thanks, i abandoned the colour again. will come back to it