[Solved] Conditionally Color the Field Box

Getting your data onto paper - or the web - Discussing the reports features of Base
Post Reply
ewtay
Posts: 44
Joined: Wed Jul 02, 2014 8:44 am

[Solved] Conditionally Color the Field Box

Post by ewtay »

Hi guys,

Needed some help on conditionally coloring the report field box.

How do i... in the Report, applying a Color to all the "0" / "Blank" field under detail section?

Thanks.
Last edited by ewtay on Mon May 25, 2015 2:51 am, edited 1 time in total.
openoffice 4.1 on windows 7
User avatar
Sliderule
Volunteer
Posts: 1278
Joined: Thu Nov 29, 2007 9:46 am

Re: Conditionally Color the Field Box

Post by Sliderule »

ewtay wrote:Hi guys,

Needed some help on conditionally coloring the report field box.

How do i... in the Report, applying a Color to all the "0" / "Blank" field under detail section?

Thanks.
I am not entirely certain I understand your question . . . that is . . . do you want to assign a COLOUR to the displayed output . . . OR . . . are you talking about a BACKGROUND COLOUR?

I will assume, you mean, COLOUR to the displayed output ( value displayed ). In that case, please check out . . . Base Help . . . topic format codes;numbers and look at: Conditions

So, in the Format for your desired field . . . for example, define the following, User Defined Number Format

Code: Select all

[RED][=0]#;[BLUE]#
Explanation: The above will apply a colour of RED when the value is 0, otherwise, it will apply a colour of BLUE . :super:

Change it to whatever you want. :bravo:

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
User avatar
Sliderule
Volunteer
Posts: 1278
Joined: Thu Nov 29, 2007 9:46 am

Re: Conditionally Color the Field Box

Post by Sliderule »

Please take a look at the following database file, HSQL-WORLDAREA4.ODB

http://www.mediafire.com/download/l87gc ... DAREA4.odb

In the report, WorldAreaReport - By Continent - Area_02 the detail column Area_SQ_KM is displayed with Conditional Formatting... .
  1. In the Detail section, click on the field Area_SQ_KM
  2. From the Menu: Format -> Conditional Formatting...
  3. Complete the Conditional Formatting pop-up ( dialog ) . . . based on your needs
    1. You can define RANGES or VALUES for the formatting
    2. You can define the Text Colour . . . with the icon
    3. You can define the Background Colour . . . with the icon
  4. Press OK when complete :super:
I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
ewtay
Posts: 44
Joined: Wed Jul 02, 2014 8:44 am

Re: [SOLVED]Conditionally Color the Field Box

Post by ewtay »

Wow...

I never thought it is this simple!

Thanks Guys!
openoffice 4.1 on windows 7
Post Reply