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!

There must be a group that matches this field

Status
Not open for further replies.

Tenloe

Programmer
Oct 21, 2005
40
US
I am getting this error message when I try to group by a date, when group on any string variable it works just fine. My column looks like this,

if sum({@CurrentPeriodIncurred}) = 0 then 0
else
sum({@CurrentPeriodIncurred},{@GROUPBY1})%sum({@CurrentPeriodIncurred})

Where current period incurred is

if {XXXCLAIM.LOSS_DT} in {?Current Period Begin Date} to {?Current Period End Date} then {@Incurred} else 0

and groupby1 would be the variable that you choose to sort by.

Any suggestions, I have tried everything to get this to work.
 
You need to have a group in the report for {@GROUPBY1}.

HTH

Gary Parker
MIS Data Analyst
Manchester, England
 
I do have that in my Group Header, anything else, like I said it only gets that error message on dates, all other variables it does fine with.
 
You have to have inserted a group on {@GROUPBY1}. Placing the formula in the group header is not sufficient.

-LB
 
I have, I said Insert>Group and then put in the formula GROUPBY1 and it shows it in the Group Header1, if you mean something else then I am not understanding what you are talking about. Please explain. I need the help.
 
Okay, I think you need to share the contents of {@groupby1} and {@Incurred}.

-LB
 
I'd do it a completely different way. Rather than summing formulas, do a running total that applies a formula rule before deciding whether to add or not.

A drawback is that the running total 'runs' with the report printing, so that the value will be zero in the group header and will not have its final value until the group footer.

The advantage is that it does automatically the things you are trying to do via your commmand, the command it does not like.

Right-click on a field and choose Insert to get a choice of Running Total or Summary. Or else use the Field Explorer, the icon that is a grid-like box, to add running totals.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
The running totals worked, of course them being in the group footer and my headers in group headers doesn't look good but all the errors have gone. Thanks for the suggestion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top