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

Formula Help

Status
Not open for further replies.

Deleco

Programmer
Feb 25, 2002
109
GB
Hi All,

Im a bit stuck and need help with a formula, let me explain.

Below is the data

Code:
GH	Dean	Full Time	
D			Gardner
D			Carpenter
D			Carpenter
D			Carpenter
D			Plumber

What i need is to set a formula to put in the group header, if in any of the details there is Carpenter then i want the formula to equal 1 else i want the formula to equal 2.

It sounds straight forward but i am having real problems with this on.

Any help would be appreciated

Deleco
 
Create two formulas.

This one goes in the detail section and is then suppressed.
{@carpenter}
if {your.field}="Carpenter" then 1 else 0

This one goes in the Group Header
if sum(@carpenter},{your.group})>0 then 1 else 2


Mike
 
Thanks very much. Worked a treat!

Now i have to use this data in a crosstab in another report, wish me luck!! ;-)



Deleco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top