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!

Error A summary has been specified on a non recurring field

Status
Not open for further replies.

jizzycrystal

IS-IT--Management
Nov 10, 2007
65
IE
Hi
I'm trying to add two formulaes:
{@Prior YTD amt} + {@PriorYTDkfBUD}

@Prior YTD amt:
IF {nltran15zeverydb.trans_period} >= "01" and {nltran15zeverydb.nlyear} = "14" THEN {nltran15zeverydb.journal_amount}
else IF {nltran15zeverydb.trans_period} >= "02" and {nltran15zeverydb.nlyear} = "14" THEN {nltran15zeverydb.journal_amount}
else IF {nltran15zeverydb.trans_period} >= "03" and {nltran15zeverydb.nlyear} = "14" THEN {nltran15zeverydb.journal_amount}

@PriorYTDkfBUD:
IF {?ytd_period} = '01' then {bud15_1.base_amount01}
else if {?ytd_period} = '02' then +({bud15_1.base_amount01} +{bud15_1.base_amount02})
else IF {?ytd_period} = '03' then ({bud15_1.base_amount01} +{bud15_1.base_amount02} + {bud15_1.base_amount03})

getting the above error
I have tried using running totals and also sum but still getting same error
Can anyone help?
Thanks
Jizzy
 
Try putting:

else 0

at the end of your formulas that you're trying to add
 
Thanks Charliy but didn't work.
It gnores @Prior YTD amt formula and just gives back the result of the @PriorYTDkfBUD formula
I am using groups....does this effect it?
 
Your problem could be nulls. Either change the formulas to include an If isnull({field}) test (must be first) or go into reports settings and change nulls to default values.
 
Thanks Charliy but no nulls
now I have created a running total for the formulae that tries to add the other two formulaes (lets call it XXX)
So I'm running it for ?ytd period "03" so I would expect to see the result of ({bud15_1.base_amount01} +{bud15_1.base_amount02} + {bud15_1.base_amount03})
AND the result of nltran15zeverydb.journal_amount for period 01 to 03 inclusive BUT it only pulls:
({bud15_1.base_amount01} +{bud15_1.base_amount02} + {bud15_1.base_amount03}) AND adds period 01.
So it doesn't pull period 02 or 03 nltran15zeverydb.journal_amount
Any help would be greatly appreciated


 
actually there are some nulls.....I have used formuale
if IsNull ({@YTD_amt}) then '0.00'
I don't understand
If isnull({field}) test (must be first)
can you explain?
Thanks
 
What I mean by that is:

This will work:
If isnull({field1} then "Not Entered"
else
if {field1} = 0 then "None"
else "Found"


This will not work:
if [field1} = 0 then "None"
else
if isnull({field1) then "Not Entered"
else "Found"

Because in the second example when a null is encountered the formula gets confused and goes stupid.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top