# Can we set color in field on the KReport?

**URL:** <https://community.spicecrm.io/t/can-we-set-color-in-field-on-the-kreport/180>\
**Category:** KReporter\
**Created:** [September 26, 2017, 8:05am UTC](https://community.spicecrm.io/t/can-we-set-color-in-field-on-the-kreport/180 "2017-09-26T08:05:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@adrian](https://community.spicecrm.io/u/adrian)\
**Post date:** [September 26, 2017, 8:05am UTC](https://community.spicecrm.io/t/can-we-set-color-in-field-on-the-kreport/180/1 "2017-09-26T08:05:55Z")

</div>

Can we add a field in a report which set color by value?  
example : if value in column color is a, color in the field report will be turn red, if value in column is b color in the report will be turn blue.

 ![kreports](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/7679e54d0ccf23e1d7032e8653d43a1d2f56fba6.png)

---

<div class="post-metadata">

**Author:** ![maretval](https://avatars.discourse-cdn.com/v4/letter/m/b38774/32.png) [@maretval](https://community.spicecrm.io/u/maretval)\
**Post date:** [September 26, 2017, 9:47am UTC](https://community.spicecrm.io/t/can-we-set-color-in-field-on-the-kreport/180/2 "2017-09-26T09:47:15Z")

</div>

Adrian,  
there is no functionality for that.  
There is a workaround by using formula in manipulate tab. It will work great on strings but as soon as you have calculations or currency fields, it won’t work. So be careful using it.

Example: I list opportunities and I want the sales stage field to be red when opportunity sage is “Prospecting”  
I **store** the value for field in a variable that I call “stage”  
In **formula** I write php code and add an html Tag for color:  
({stage} == “Prospecting” ? “”.{stage}."" : {stage})

![AdvFormulaColorForCell01](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/a5f990ef68c6b7fc845e8a54369ec1fc775aa4af.png)

 ![AdvFormulaColorForCell02](https://canada1.discourse-cdn.com/flex030/uploads/spicecrm/original/1X/7468c63bedb2b8e213e9a35dcc65a59c4363c03e.png)

Val

---

<div class="post-metadata">

**Author:** ![adrian](https://avatars.discourse-cdn.com/v4/letter/a/82dd89/32.png) [@adrian](https://community.spicecrm.io/u/adrian)\
**Post date:** [September 27, 2017, 3:06am UTC](https://community.spicecrm.io/t/can-we-set-color-in-field-on-the-kreport/180/3 "2017-09-27T03:06:09Z")

</div>

Ok maretval I have try it and it has succeed
