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

Formula Will Not Display in Header

Status
Not open for further replies.

LZido

Technical User
Aug 24, 2006
21
0
0
US
I have a formula that will not work in the Report Header but will work in Details.
I created a formula to add a day to a parameter date {?Start Date}+1. I did this for 7 days. I then wrote a formula to give me the total hours based on type of hours for each day.

First formula: This is based on just the start date parameter without adding +1.
if {Coverage.TYPEOFHOURS} = "ON DUTY CREW" and
{Coverage.DATEIN} = {?Start Date} then {@TotalHours}

Second formula: this is same as above but using Start date parameter +1.
if {Coverage.TYPEOFHOURS} = "ON DUTY CREW" and
{Coverage.DATEIN} = ({?Start Date}+1) then {@TotalHours}

The first formula works in both the Detail section and the Report Header. The second formula will only work in the Detail section. When I place it in the header I get 0.00 instead of 24.00.

Any solutions?

 
I bet you have sorted & grouped your data by {coverage.datein}. The first formula works because you are looking at the first date when processing the report header. When processing the first record {Coverage.DATEIN} = ({?Start Date}+1) will be false. You did not provide an "else" part of your If statement so Crystal gave you what you asked for: A blank.

Howard Hammerman,
Crystal Training and Crystal Material
On-site classes and one-on-one coaching
Low-cost telephone/email support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top