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

Error: This Field Cannot be Summarized - Crystal 11

Status
Not open for further replies.

GayleC

Technical User
Apr 27, 2011
28
US
I'm getting the error message "This field cannot be summarized" for a field called {@VOIDEDPROC} in a formula called "Maximum" . The following are my formulas:

VoidedProc
if isnull ({PatientVisitProcs.Voided}) then 1
else
IF {PatientVisitProcs.Voided} = 1 then
(if cdate ({PatientVisitProcs.DateOfEntry}) > {%MinEDIDate} then
if cdate({PatientVisitProcs.DateOfEntry}) <= ({@2nd Filing}) then 0)
Else 1


Maximum
if maximum ({@VOIDEDPROC},{PatientVisit.PatientVisitId})= 0
then "Dirty"
else "Clean"


I used this same type of formula for evaluating some other data in my report with no issues. The formula that I used that works is below:

RCode
if trim({@ReasonCode1}) = "" then 0
else
if trim({@ReasonCode1})in [list of stringvariables]
then 0
else 1

RCodeStatus
if maximum ({@CleanDirty4},{PatientVisit.PatientVisitId})=0
then "Dirty"
else "Clean"

Thank you in advance
 
Almost certainly will be because of {@2nd Filing}. You should post the code for any formula referred to.

Does that formula reference a Running Total, or use Previous or Next functions. If the answer to any of these questions is YES, that will be the cause.
 
Sorry about that. Yes {@2nd Filing} uses Previous function. Is there a workaround? Below is the formula for {@2nd Filing}

stringvar ReasonCode;
if RecordNumber=1 then
ReasonCode:= {TransactionDistributions.AdjustmentReasonCode1}
else
(if {PatientVisit.PatientVisitId}=previous ({PatientVisit.PatientVisitId}) and cdate({Transactions.Created})<={%earliesteob} then
ReasonCode := ReasonCode+","+{TransactionDistributions.AdjustmentReasonCode1}
else
if {PatientVisit.PatientVisitId}=previous ({PatientVisit.PatientVisitId}) and cdate({Transactions.Created})>{%earliesteob} then
ReasonCode:= ReasonCode
else
ReasonCode:={TransactionDistributions.AdjustmentReasonCode1});
ReasonCode

The forumula for {%earliesteob} is below:
(
select min ("VisitTransactions"."Created")
from VisitTransactions
where "PatientVisit"."PatientVisitId"="VisitTransactions"."PatientVisitid" and "VisitTransactions"."InsuranceCarriersId" > 0
)

Thank you
 
You would need to use a Variable to look at each detail line, and if any row meets the specified conditions. the entire group (VisitID) is flagged as 'Dirty'.

Something along the following lines should work, based on my understanding of your logic:

Details Section formula (Suppressed):
[Code {@VarTEST}]
WhilePrintingRecords;
Global StringVar CD;
IF {PatientVisitProcs.Voided} = 1 AND
CDATE({PatientVisitProcs.DateOfEntry}) > {%MinEDIDate} AND
CDATE({PatientVisitProcs.DateOfEntry}) <= {@2nd Filing}
THEN CD := 'Dirty'
ELSE CD := CD[/Code]
Report Header formula (Suppressed):
[Code {@VarRESET}]
WhilePrintingRecords;
Global StringVar CD := 'Clean'
[/Code]
Report Footer formula:
[Code {@VarDISPLAY]
WhilePrintingRecords;
Global StringVar CD
[/Code]

The solution is untested, but should work based on my limited understanding (or at least get you close to what you need) as long as I haven't messed up the syntax somewhere.

This looks to be the 3rd in a series of questions raised in relation to just one report. I'm not sure there is much more I can do here.

Hope I have been able to assist.

Pete
 
Thanks Pete, it is the third question. I'm way over my head on this one, normally I would have had a report this complicated written by a SQL programmer, but we are currently without one. Your solution above works as long as I move all my results down to the footer vs the header.

I appreciate the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top