[Solved] Conditional Formatting Using Report Builder

Getting your data onto paper - or the web - Discussing the reports features of Base

[Solved] Conditional Formatting Using Report Builder

Postby Mokonzi » Wed Mar 11, 2015 11:10 am

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.
Last edited by Hagar Delest on Thu Mar 26, 2015 5:09 am, edited 1 time in total.
Reason: tagged [Solved].
Mokonzi

OpenOffice 4.1.1 on Windows 7
Mokonzi
 
Posts: 5
Joined: Tue Feb 10, 2015 7:30 pm

Re: Conditional Formatting Using Report Builder and Expressi

Postby F3K Total » Fri Mar 13, 2015 9:29 pm

Hi,
e.g. Expression is:
Code: Select all   Expand viewCollapse view
AND([B1];NOT([B2]))

See example.
R
Attachments
Report_conditional_formatting.odb
(24 KiB) Downloaded 178 times
    MMove 1.0.6
  • Extension for easy, exact positioning of shapes, pictures, controls, frames ...
    my current system
  • Windows 10 AOO, LOLinux Mint AOO, LO
F3K Total
Volunteer
 
Posts: 950
Joined: Fri Dec 16, 2011 8:20 pm

Re: Conditional Formatting Using Report Builder and Expressi

Postby Mokonzi » Wed Mar 18, 2015 11:12 am

Awesome. Thanks for the help matey. :)
Mokonzi

OpenOffice 4.1.1 on Windows 7
Mokonzi
 
Posts: 5
Joined: Tue Feb 10, 2015 7:30 pm

Re: [Solved] Conditional Formatting Using Report Builder

Postby mihmih » Sun Jan 19, 2020 4:32 pm

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....
LibreOffice 4.2 on Windows7
mihmih
 
Posts: 106
Joined: Wed Feb 18, 2015 9:21 pm

Re: [Solved] Conditional Formatting Using Report Builder

Postby Villeroy » Sun Jan 19, 2020 4:51 pm

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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27729
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Conditional Formatting Using Report Builder

Postby mihmih » Sun Jan 19, 2020 5:18 pm

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.
LibreOffice 4.2 on Windows7
mihmih
 
Posts: 106
Joined: Wed Feb 18, 2015 9:21 pm

Re: [Solved] Conditional Formatting Using Report Builder

Postby Villeroy » Sun Jan 19, 2020 6:42 pm

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   Expand viewCollapse view
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   Expand viewCollapse view
[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   Expand viewCollapse view
[N]="BBBBB"

This expression returns true when field N has the text BBBBB and applies my formatting to the selected field B1.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 27729
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: [Solved] Conditional Formatting Using Report Builder

Postby mihmih » Mon Jan 20, 2020 11:02 am

That's exactly what I meant, thank you for the perfect explanation.
LibreOffice 4.2 on Windows7
mihmih
 
Posts: 106
Joined: Wed Feb 18, 2015 9:21 pm


Return to Reporting

Who is online

Users browsing this forum: No registered users and 0 guests