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!

How do I summarize a formula field?

Status
Not open for further replies.

ewarr

Technical User
Nov 25, 2008
31
0
0
US
I'm grouping report like this:

Customer Name Sales period 1 Sales period 2
Product 1000 2000

I'm using formulas to calculate sales by date range as I have multiple date ranges across report. I need to summarize sales for each date range by customer. Crystal won't allow me to summarize a formula. Can you help?

Thanks
 
It will sometimes. I have sometimes gotten around this by making my own functions to do the sum.

i.e.,
first formula (at group header or page header)

shared variable total :=0 ;

second formula
shared variable total;
if meets condition then
total := total + somevalue;

third formula (at group footer or page footer)
shared variable total;
total

I hope this helps.
 
Thanks. I figured out my problem. My formulas were already summing so Crystal won't allow me to sum a sum. I had the formulas in header but did not have them in details line. I removed the summarization from formulas, put them in detail line, then put summary of that back in header, and then was able to get a grand total summary in footer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top