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

Group Formula: There must be a group that matches that field 1

Status
Not open for further replies.
May 5, 2005
39
US
Hi everyone. I am using Crystal 11.

I have created a report that has some formulas in my first group. I would like to change the group on the report frequently dependent upon who the report is going to.

Anyhow, after I change the group, I get an error message that says "there must be a group that matches that field".

I believe the reason this is happening is because the group name is identified in my formula.

Sum ({@CurrentMonthCommit}, {qryClosed.MD})-Sum ({@PrevMonthCommit}, {qryClosed.MD})

MD is the group name. I have changed the group to say market but the formula is built on the MD group qryClosed.MD.

Is there a work around on this that anyone knows of.

Thanks as always.
 
You should set up the group to be based on a conditional formula. Let's say you set up a parameter {?Groupby} to determine which field you want to group by. Then create a formula {@Groupby}:

select {?Groupby}
case "MD" : {table.MD}
case "Market" : {table.market}

Then use {@Groupby} in your formulas as the group field, as in:

Sum ({@CurrentMonthCommit}, {@Groupby})-Sum ({@PrevMonthCommit}, {@Groupby})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top