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

Is there a way to have a formula fi

Status
Not open for further replies.

SarahMS

Technical User
Sep 7, 2001
32
US
Is there a way to have a formula field that uses two groups? I want to select the max grouped by one thing, then the sum of that grouped by something else. Here's the syntax I've got, and it gives me a summary/running total field could not be created.

sum(maximum({PayVer.c1},{PayVer.empid}),{PayVer.accountname})

Basically, if I have

Account 1
empid 1
c1 - 2
c1 - 2
empid 2
c1 - 2
c1 - 2
empid 3
c1 - 1

The summary field should be 5.

CR 8.0
 
You can create a variable, reset it in the Group Header for Level 1, and increment it in the Group Footer Level 2 (with the value of the maximum for that group).

In the Group footer for Level 1, display the value of that variable.

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for the pointer. We found out just now that it was only because of a data problem that we had multiples of c1 for an employee. Once we got that fixed, it cleared up the whole problem. Thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top