somayeh.yazdane
somayeh.yazdane

Reputation: 31

How to get sum of field values in stimulsoft report

I used the following code to get the sum of the field values :

{cSum(DataDataSource1,DataSource1.Hour)}

It works correctly for the all of the pages except the last one. If my last page has one record it shows 0 for the sum of the record and it's value gets added to the previous page!!

How can I resolve this problem ?

Upvotes: 2

Views: 7104

Answers (1)

Eqbal Sohrabi
Eqbal Sohrabi

Reputation: 841

if you want to get the sum of whole report use following in a ReporSummaryBand:

{Sum(DataDataSource1,DataSource1.Hour)}

and for sum of each page use following in PageFooterBand or GroupFooterBand:

{cSum(DataDataSource1,DataSource1.Hour)}

and just do the following :

1) double click on Text field that contain your sum Formula

2)in left panel choose Summary

3) in right panel :

for Whole report sum choose Report radio button

for sum of each page choose Page radio button

4) be sure Running Total and Condition Not checked.

I hope this be helpful

Upvotes: 3

Related Questions