Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Color in a field 1

Status
Not open for further replies.

pvwdr

MIS
Jan 16, 2003
38
US
I would like to highlight a field if a date is null.

Right now I am going into the selection expert for a Date field, clicking on the border tab, and putting the following formula for the backround ...
if isnull({date_field}) then yellow else nocolor

this works if I am trying to highlight this grouped section but it doesn't work for a specific field ... I am sure it is something I am just overlooking ... thanks, Bill
 
You said "this works if I am trying to highlight this grouped section but it doesn't work for a specific field". Do you mean that it highlights the background for the whole grouping but not the backgrounds of the fields in the section? Maybe you can layout some sample date and describle what exactly has changed color. Also, your field may not be null but actually an empty string so you may need to test for that.

~Brian
 
I have checked for Null and it is definatly null.
The fileds of the group don't highlight htemselves, the whole group row gets highlighted adn as a result everything, both fields and text gets highlighted. I would just like to isolate specific fields
 
Try right clicking on the field->change border->background->X+2 and enter:

if isnull({date_field}) or
{date_field} = date(0,0,0) then cryellow else crnocolor

-LB
 
If a field is null, it will not execute formatting options. You can validate this by inverting your formula to "if not isnull({date_field}) then yellow else nocolor".

What you'll most likely have to do is place a text box the same size as your field underneath your datefield. Color the background of the text box, and set a conditional suppression of Not IsNull({YourDate}).

Naith
 
helluva workaround ... thanks, that did the trick. I was thinking about not being able to program on Null's but I wasn't sure if CR would let you do that ... I guess not ... thanks again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top