Conditional formating on report

Mansoor Ahmad

Registered User.
Local time
Today, 09:02
Joined
Jan 20, 2003
Messages
140
On a report there is a text box customers. I want certain customers to be printed in one colour and otheres in a different colour.

Say I have 4 customers A,B,C,D to show in red and the rest in blue.

I have tried to set in conditional formating but it only works for one customer at a time and there are only 3 conditions allowed. Can somebody advise me how can I do it and if I should be using an expression, what would that be?

Thank you
 
There is a more complex way to do this using code, but here's a simple solution.

If your customer table has no field that specifies when he/she should be red/blue then you could...
1.)add a yes/no field to the table. Checked being (red) and unchecked being (blue).
2.)Then you can set the conditional formatting on your report with an expression on that Y/N field and set the color based on if it's checked or not.

Conditional Formatting:
Expression YourField=true 'set the formatting to color red
Expression YourField=false 'set the formatting to color blue

Like I said, there is a more robust way to this, but this way is quick and easy. However, if you have a field that can be used (i.e. active/inactive or something like that) to specify when something should change color then you can use that field instead of adding a new field.

Hope that makes sense. Let me know if it doesn't.
 
Thanks

Casey

Thank you very much for your reply. When I looked at the fileds again there was a field that could be used as a reference to change coulours of that field.

I wasn't sure how to use Expression in condition sentence, but with your help I have managed to do it now.

Thank you again.

;)
 

Users who are viewing this thread

Back
Top Bottom