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!

Can't Sum a formula that contains a formula

Status
Not open for further replies.

MEllison

Technical User
Feb 6, 2002
1
US
Hi,

I am trying to sum a formula that contains a formula. I have the following formula called SubCatScore:

IF Sum ({RPT_Gap_Co_Profile.wgtdscore}, {RPT_Gap_Co_Profile.subcat}) > 0 Then
Sum ({RPT_Gap_Co_Profile.wgtdscore}, {RPT_Gap_Co_Profile.subcat})/
Sum ({RPT_Gap_Co_Profile.weight}, {RPT_Gap_Co_Profile.subcat})

Else 0

This appears in the header of Group2.

Also in the header of Group2, I have a formula called WgtdSubCatScore, which is:

{@SubCatScore}*{IR_Sub_Categories.Institutional_Weighting}

The problem is I want then sum that formula (WgtdSubCatScore) for Group1, but every time I try I get an error "The summary/running total field could not be created." Moreover, Crystal's Sum button doesn't seem to let you sum custom formulas.

I'm kind of new to this so perhaps I'm doing something wrong. Hope someone can help.

Thanks!
 
You can't sum a formula that (directly or indirectly) uses a summary function.

Have a look at the bubble diagram in the CR manual that shows what happens at each phase of the report process, and you'll see that summaries only happen once in the process - after the WhileReadingRecords formulas, but before WhilePrintingRecords.

You will need the 3 formula technique using a variable to calculate your total. Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top