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

There must be a group that matches this field

Status
Not open for further replies.

Tenloe

Programmer
Oct 21, 2005
40
US
Can anyone explain to me exactly what this error means and the best ways to go about fixing the issue. It only happens when I group by any date fields, all of the other string fields work fine. Thanks in advance for any help
 
This error appears when you are using a group condition in a formula or group selection formula when there is no corresponding group.

When you insert a group on a date, you would just insert the group on the datefield and then choose "Print on change of " and select the date condition for the group, e.g., "weekly", "monthly", etc.

Where are you in the report when you receive this message?

-LB
 
I only have one formula in the detail section.

If Len(Cstr({XXXNOTE.DONE_DT})) = 0 and {XXXNOTE.DIARY_DT} < CurrentDate Then
(nDays:= CurrentDate - {XXXNOTE.CREATE_DT};
Group1Days:= Group1Days + nDays;
Group2Days:= Group2Days + nDays;
Group3Days:= Group3Days + nDays;
Group4Days:= Group4Days + nDays;
GTotNDays:= GTotNDays + nDays;);

nDays;

Is this causing it?

Where do you mean by where I am at in the report? The groups are sent in by c++ so I have no control of getting to insert them myself.
 
Somewhere you have a formula that looks something like this:

sum({table.amt},{table.fieldA}) //where there is no group on {table.fieldA}

When the error pops up it should take you to the formula that isn't working properly.

-LB
 
Unfourtunately we get these generic errors from Visual Basic and it doesn't tell us where. Thanks LBASS, I'll find it somewhere in here.
 
ok, I am supressing the groups based on Minimum({@DaysOverdueSuppression}, {@GROUPBY4}) = 1 is that causing it?
 
Do you have a group on {@GroupBy4}?

You could also try commenting out the formula (adding "//" in front of it) and see if the error goes away.

-LB
 
Well its definately that formula but I absoulutely have grouby4 added into the group. And groupby4 is sent in through the c++.
 
What do you mean "added into the group"? If you go to report->group expert, do you see a group called "@Groupby4"?

-LB
 
i wonder if the data source changed and you have a dead group. remove what you think groupby4 is from the design view and re-add it.
 
no change - why is it only the date fields?
 
What are the contents of {@DaysOVerduesuppression} and {@Groupby4}, including the contents of any nested formulas?

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top