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!

To Calculate Sum of formula field in group header and to display in R

Status
Not open for further replies.

Bvreddy

Programmer
Aug 30, 2004
15
0
0
BW
Hi everyone ,
Is there any way to use onchange of event in Formula edditor!!!
I am Using CR 8.5 and Sql server,
I am having a problem to show the Total of average of a field in a group at the end if the report.

I am Using SP as datasource for this report and i am getting all the details.
group by company
company Field1 field2 Price
ABC 2 6 1200
BDF 5 7 1500

i want to show in report footer that 1200+1500 = 2700

i am using a formula and calculating the price. I am not printing the Group detail section. I am showing only one Record for group and calculating all the values

after printing all the records i am trying to display the sum of Price which i will take once for a group and calculate the sum of price at the end of the report.

any help will be appriciated

thanks

 
What do you mean by the Group Detail section? There are Groups, and there are Details, but not a Group Detail.

Right click the field and select Insert->Summary->Sum and select for both the Group level and Grand Total.

Now you have the totals.

You will have these formulas available to you in the Formula Editor also for advanced formulas, but if you want to build an average (one section says that you want an average, yet the further explanation only states the total), then just do the same thing and instead of a Sum, request the average.

-k

 
You should share the contents of your formula {@price}. If it is an average at the group level, and you want to sum it at the report level, then create two formulas:

//{@accum} to be placed in the group header or footer:
whileprintingrecords;
numbervar sumave := sumave + {@price};

This assumes that {@price} is a formula like:

average({table.price},{table.groupfield})

//{@display} to be placed in the report footer:
whileprintingrecords;
numbervar sumave;

-LB
 
Hi all thanks for ur reply,
hi Lbass i tried and now i am able to get the total.
This solved my problem.
Thanks a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top