Page 1 of 1

[Solved] Conditional Formatting Using Report Builder

Posted: Wed Mar 11, 2015 11:10 am
by Mokonzi
I'm trying to get the Report Builder to format a field based on the contents of another two fields, but no success. I'm struggling to understand how the syntax works for it.

I need one field that is true and another that is false to trigger setting the formatting to italics. Can anyone post any suggestions on the syntax I need to use?

Many thanks.

Re: Conditional Formatting Using Report Builder and Expressi

Posted: Fri Mar 13, 2015 9:29 pm
by F3K Total
Hi,
e.g. Expression is:

Code: Select all

AND([B1];NOT([B2]))
See example.
R

Re: Conditional Formatting Using Report Builder and Expressi

Posted: Wed Mar 18, 2015 11:12 am
by Mokonzi
Awesome. Thanks for the help matey. :)

Re: [Solved] Conditional Formatting Using Report Builder

Posted: Sun Jan 19, 2020 4:32 pm
by mihmih
Maybe someone can help me...

What will the code be if I would like to change the color of one column if another column is equal to 'aaa' or her value is TRUE

for axample, TRUE([column2]) in conditional formating of column1 does not working....

Re: [Solved] Conditional Formatting Using Report Builder

Posted: Sun Jan 19, 2020 4:51 pm
by Villeroy
In a database you can not have 'aaa' or TRUE in the same column. Either you have strings or booleans in the same column but not both.

Re: [Solved] Conditional Formatting Using Report Builder

Posted: Sun Jan 19, 2020 5:18 pm
by mihmih
Yes, i know.

I want to change the color of one column if another column is equal to 'aaa' . If this is not possible, i can change 'aaa' in a source of query to boolens.

Re: [Solved] Conditional Formatting Using Report Builder

Posted: Sun Jan 19, 2020 6:42 pm
by Villeroy
Open the example database provided by F3K Total.
Right-click>Edit the report.
Select the field with content =N
menu:Format>Conditional...
Expression is (not "value is"):

Code: Select all

AND([B1];NOT([B2]))
This expression returns True if the value in the column named B1 is True AND the value in the column named B2 is NOT True, in short: if B1 AND NOT B2.
This is aalmost exactly what you want.

Select the field with content =B1
menu:Format>Conditional...
Expression is (not "value is"):

Code: Select all

[N]='BBBBB'
and add some visible formatting attribute.
This most simple expression fails to apply some color to field B1 where the text in N equals BBBBB
This feature looks very much like Calc's conditional formatting but with column names in brackets instead of cell addresses. Spreadsheet formulas put literal strings in double-quotes.

Code: Select all

[N]="BBBBB"
This expression returns true when field N has the text BBBBB and applies my formatting to the selected field B1.

Re: [Solved] Conditional Formatting Using Report Builder

Posted: Mon Jan 20, 2020 11:02 am
by mihmih
That's exactly what I meant, thank you for the perfect explanation.