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!

Sum of calculated fields.??? 1

Status
Not open for further replies.

zambakh

Technical User
Jun 29, 2009
7
TR
Hi,
How can I get the summary of a calculated field.

 
show the formula for your calculated field

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
({@GTT}/{@GMT})*Sum ({@Ç?k??-Miktar}, {xstok_hareketRECORD.stok_kod})

GTT : Purchased Total Amount (on GH)
GMT : Purchased Total Quantity (on GH)
Sum ({@Ç?k??-Miktar}, {xstok_hareketRECORD.stok_kod}) : Sold Total Quantity (on GH)


 
You can't summarise something that is itself a summary, one of the limits of Crystal.

The normal solution is to have a second summary for the whole report, or for a higher-level group.

The use of Crystal's automated totals is outlined at FAQ767-6524.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 10 & 11.5 with Windows XP [yinyang]
 
Well, that isn't really true. You CAN summarize calculations, you just can't INSERT summaries on them.

You didn't say what the desired summary was or at what level, but if you want a grand total of these calculations, use a variable. Create two formulas:

//{@accum} to be placed in the group section containing the calculation:
whileprintingrecords;
numbervar sumx := sumx + {@yourcalculation};

//{@display} to be placed in the report footer (group footer if summary is for a higher order group):
whileprintingrecords;
numbervar sumx;

If you want the result displayed in some higher order group, you need a reset formula in that group header:

whileprintingrecords;
numbervar sumx;
if not inrepeatedgroupheader then
sumx := 0;

-LB
 
Thank you very much friends, especially lbass.

It worked. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top