How to do conditional formatting in Report? ...

How to do conditional formatting in Report?

I have a field called “Status” and possible values are “DONE” and “NOT DONE”. I have done format rules in such a way that “DONE” will be green and “NOT DONE” will be red.

When i have them on a report, it prints in black color.

How do i achieve this?

Thanks.

1 14 1,875
14 REPLIES 14

I think in reports formatting is controlled by the template (i.e. Google Doc), therefore you cannot dynamically change formats based on the column’s value from AppSheet.

Actually… you can:D

@Aleksi_Alkio How? Please

<<IFS([STATUS]=“DONE”,[STATUS])>><<IFS([STATUS]=“NOT DONE”,[STATUS])>> Then choose different color for both formulas. When the other one is blank, you just don’t see it

The syntax is different to appsheet in-app syntax, ie, you have used IFS, instead of IF. Do you know if there is a reason for that, @Aleksi ?

@Andrew_Eills
That’s a formatting for report template. <<[ColumnA]>> is a placeholder for the report template to record the value of the [ColumnA] in the report. As the user wants to conditionally format the text as per [STATUS] column, you need to use 2 IFS statements so that if the conditional statement is FALSE, the placeholder appears as blank in the template. With IF statement, you can provide the same functionality but the expression will be longer and instead of a blank placeholder it will probably leave a blank space.

<<IF([STATUS]=“DONE”,[STATUS],"")>><<IF([STATUS]=“NOT DONE”,[STATUS],"")>>

Thanks for explaining.

You’re welcome

Hi Alexi.
Thanks for explaining, I used this answer in my APP. But I still cannot get color in my PDF report (from a Google doc template). I got the formula to work, but still black. I made Format Rules for color in UX, but colors are only showing in APP (not in report).
What did you mean by: “Then choose different color for both formulas.”?
I think I might have misunderstood that part…?

PS: I use this to risk evaluation. Like Risk before (RED/Yellow/Green) and Risk after (RED/Yellow/Green).

Br.

You nailed it! Thank you

@Aleksi_Alkio Great…Short and Simple Logic… Thanks lot

You’re welcome

See topic “If Expressions Can Conditionally Format a Field” in this article https://help.appsheet.com/en/articles/2697069-template-if-expressions

Thanks a lot. Got it!

Top Labels in this Space