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

Cannot summarize this field

Status
Not open for further replies.

newbie0423

IS-IT--Management
Oct 29, 2012
103
US
Crystal XI

I am trying to sum a field but I keep getting a message " this field cannot be summarized". The field I'm trying to total is a formula @turnover and it is written like so:

if OnfirstRecord then
0

Else if Date({v_basic_case_rec_data.cr_prdate}) <> Date(Previous({v_basic_case_rec_data.cr_prdate}))then
0
Else if {v_basic_case_rec_data.room_mnc} <> Previous({v_basic_case_rec_data.room_mnc}) then
0
else
if previous ({@PtOutTime}) > {@roomrdy}then
0
else

IF {v_basic_case_rec_data.room_mnc} = PREVIOUS ({v_basic_case_rec_data.room_mnc})
THEN ({@roomrdy} - PREVIOUS ({@PtOutTime}))/60


Is it the "previous" function that is preventing me from finding the sum of this field?

Thanks in advance for your help
 
Newbie043,

In short, "Yes". As Previous() requires the report to be ran prior to evaluating, it cannot be summarized (I think is the "technical" explanation... but 99%+ certain Previous() is your hangup).

To get around this issue, you would need to investigate possiblities with Conditional Running Totals or a similar approach. I cannot recall a time where I have had to use these against a situation with "Previous", but it has allowed me to circumvent this error when it has arisen due to other built-in functions which trigger a "cannot summarize".

Conditional Running Totals generally require three formulas to implement, examples of which I posted recently in the following threads (one of them yours [smile]):
thread767-1712972
thread767-1713174

Please advise should you have further questions.

Cheers!

Mike
---------------------------------------------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure,
in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top