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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report sum of all columns 2

Status
Not open for further replies.

DPaul1994

Programmer
Joined
Mar 9, 2015
Messages
46
Location
RO
Hi guys. I have a report with 3 columns. One of columns is called "price". I want to insert in report one field where to store the sum of all "price" values from the report. Is that possible?
 
Make a copy of your "price" field, drag it to the report's summary band. Double click it to open the properties sheet and choose "Calculations". Set it to Sum.

Done.
 
Hi Dpaul, and welcome to the forum.

One way to do this would be to add a new field to the summary band. Set its expression to the sum of the three individual fields. For example, if the three columns were based on fields named F1, F2 and F2 respectively, the expression for this new field would be:
F1 + F2 + F3.

Then, in the Calculate tab of the new field's properties dialoge, set the Calculation Type to Sum.

This will give you the grand total of the three columns. You can of course also do the totalling at the group level if you prefer.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Thank you! And I have a data field for each record, and I want to store in a page all records that are equal with that data. Is that possible?
 
It's ok, I get the idea anyway :)
 
And open a new page for each new data
 
It's ok, I solved it, thank you anyway!
 
I assume you have now set up one or more grouping bands. If so, go to the Report menu, then select Data Grouping. In the resulting dialogue, select "Group starts on new page".

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top