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!

a summary has been specified on a non recurring field 1

Status
Not open for further replies.

dunlop1975

IS-IT--Management
May 22, 2007
124
CA
a summary has been specified on a non recurring field"

I am in the process of building a report that needs to pull data from the first case of that is in a certain time range (determined via parameter).

originally I used the min function within a group selection critera and everything looked ok. On closer inspection, even though the other cases do not appear on the report it seems they are still being used in the calculations


To get around this I tried to make a change to forumal below

if isnull({Field1}) then 0
else if ({Field2} = previous({Field2}) and {Field3} = previous({Field3})) then 0 <----this is the change
else 1

without the comparision line, the formula works perfectly to be used for my weighted averages, but I now receive :

"a summary has been specified on a non recurring field"

I'm stumped as regardless there should always be a value (1 or 0) returned in this formula.

Any ideas?
 
The problem is that the formula requires a sequence of records, so you can't group on it. Using group selection is probably the right way to go. When using group selection, underlying non-group selected records DO contribute to the ususal summaries, but you can insert running totals instead--which will be based only on the group-selected records. You don't have to specify anything in the evaluation formula of the running total (unless you ALSO have suppressed records you want to omit).

There is another approach where you could use a SQL expression to return the minimum and then use that in the record selection formula so that only that record is returned. Then you could use the usual summaries. If you want to try that, please identify your CR version and also identify your tables/fields by showing a copy of your current SQL query. Please be clear about which field you want the minimum of and at what group level.

-LB
 
Right on the money as usual LB, thank you.

I'm using CR2008, the running total solution works great on my crosstab
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top