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!

Grouping based on a Summary field??

Status
Not open for further replies.

CrysUser

Programmer
Apr 21, 2003
64
US
Is it possible to group based on a formula using summary columns?

Here is my situation

Group 1 - Zone
Group 2 - Location
Details - suppressed

Group footer 2
Location name total commitments total Loads Status

XXX 23 5 unmet
sss 5 10 Exceeded
aaa 2 2 Met
asd 11 5 unmet

Where status is determined by

if maximum({total commitments},{location}) > sum({total loads}, {location}) then
status = unmet
else if maximum({total commitments},{location}) < sum({total loads}, {location}) then
status = Exceeded
else
status = Met

Is it possible to sort or group the rows by this status column?
Any help would be greatly appreciated.
 
Because of the way Crystal Reports process, you cannot group on a formula that contains a summary function. You may be able to build a view that would create these values for you prior to the data being returned to Crystal, which will allow you to then group on them.

~Brian
 
Thank you for your response.

I will try it out using a stored procedure then.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top