In Crystal the best way to add values up (or any function), where you
control exactly when and where in the report, is to use manual running
totals. You will have consistent results and it is much easier to
troubleshoot if something is not calculating properly. There are three
formulas to setup; Declare, Populate and Display.
So say you want to add up Invoice Totals for each Customer. Your report has
two Group By sections. The first being Customer and the second being Invoice
Header. Display the Invoice Amount in the details sections
-----------
In Group Header Section One (Customer) you place the Declare Formula
Formula Name: DecCustTotal (Declare Customer Total)
WhilePrintingRecords;
Shared NumberVar CustomerTotal;
CustomerTotal :=0;
-----------
In the Detail Section (Where you are display the Invoice Amount of each
Invoice) you place the Populate
Formula Name: PopCustTotal (Populate Customer Total)
WhilePrintingRecords;
Shared NumberVar CustomerTotal;
CustomerTotal := CustomerTotal + InvcHead.InvoiceAmt;
----------------
In the Group Footer One (Customer) you place the Display Formula
Formula Name: DspCustTotal (Display Customer Total)
WhilePrintingRecords;
Shared NumberVar CustomerTotal;
------------
As it goes through each Customer (Group Header One) it will reset the
CustomerTotal variable to zero, Populate that variable with the Invoice
Amount and then Display it in the Customer Group footer. You do not have
to put the Populate in the Details section it can go in any section where
you want to do a function. It is just a matter when do you want to reset the
variable to zero, when do you want it to do the math function (populate) and
when do you want to display the variable.
Hope this makes sense and helps.
Scott
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
cooner_55421
Sent: Monday, October 31, 2011 7:36 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: sum averages in CR 2008?
--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Michelle Giesige" <mgiesige@...> wrote:
control exactly when and where in the report, is to use manual running
totals. You will have consistent results and it is much easier to
troubleshoot if something is not calculating properly. There are three
formulas to setup; Declare, Populate and Display.
So say you want to add up Invoice Totals for each Customer. Your report has
two Group By sections. The first being Customer and the second being Invoice
Header. Display the Invoice Amount in the details sections
-----------
In Group Header Section One (Customer) you place the Declare Formula
Formula Name: DecCustTotal (Declare Customer Total)
WhilePrintingRecords;
Shared NumberVar CustomerTotal;
CustomerTotal :=0;
-----------
In the Detail Section (Where you are display the Invoice Amount of each
Invoice) you place the Populate
Formula Name: PopCustTotal (Populate Customer Total)
WhilePrintingRecords;
Shared NumberVar CustomerTotal;
CustomerTotal := CustomerTotal + InvcHead.InvoiceAmt;
----------------
In the Group Footer One (Customer) you place the Display Formula
Formula Name: DspCustTotal (Display Customer Total)
WhilePrintingRecords;
Shared NumberVar CustomerTotal;
------------
As it goes through each Customer (Group Header One) it will reset the
CustomerTotal variable to zero, Populate that variable with the Invoice
Amount and then Display it in the Customer Group footer. You do not have
to put the Populate in the Details section it can go in any section where
you want to do a function. It is just a matter when do you want to reset the
variable to zero, when do you want it to do the math function (populate) and
when do you want to display the variable.
Hope this makes sense and helps.
Scott
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
cooner_55421
Sent: Monday, October 31, 2011 7:36 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: sum averages in CR 2008?
>Can't summarize a summary.Using a running total instead can work in some of these cases.
--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
"Michelle Giesige" <mgiesige@...> wrote:
>formula
> I am trying to sum averages in Crystal Reports 2008. I have multiple
> fields that I have averaged by inserting a summary using average. I nowwant
> to sum those averaged fields. In my new formula field I keep getting the[Non-text portions of this message have been removed]
> error "this field cannot be summarized." Is there a way to accomplish this
> math?
>
>
>
>
>
> Michelle Giesige
> Randall Bearings, Inc.
>
>
>
>
>
> [Non-text portions of this message have been removed]
>