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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula to Suppress Field Background

Status
Not open for further replies.

skystar70

Technical User
Nov 3, 2006
40
US
Hi there. I am using Crystal version 9.2 and I am trying to put a yellow background on a particluar field of data and then suppress the backround if the data meets certain criteria.
The field is a datetime field. I want to supress the backround if the datetime field is +/- 30 days from the current date. When I try to create this formula, in the format field - suppress formula for the background option, I get a message that "The formula result must be a number". I have tried all kinds of formulas. Here is one:
{@ProjectEndDate} in Aged0To30Days
Here is the formula for @ProjectEndDate:
If isnull({custom_data.actcompdate}) Then
If isnull({custom_data.acecmpldt}) Then
If isnull({custom_data.planenddate}) Then
DateTimeValue (1900, 01, 01)
Else
{custom_data.planenddate}
Else
{custom_data.acecmpldt}
Else
{custom_data.actcompdate}

Any help would be greatly appreciated.

Thanks,
Skystar
 
Never mind. I got it. Didn't give myself enough time to figure it out. Here is my formula:

if ({@ProjectEndDate} in Aged0To30Days) or
({@ProjectEndDate} in Next30Days) then yellow
else white

Thanks!
Skystar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top