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

Adding up number of records (details)

Status
Not open for further replies.

redeemasp

Programmer
Jun 1, 2004
63
GB
Hi,

Is there an internal function in Crystal that Adds up the number of records (details)?

Thanks

Lee
 
Are you looking for a total count of the number of records? There isn't a built-in function that does this automatically, but you can create your own summary function that would return the total record count.

You can do this one of 2 ways.

1. Right click the field on your report that you want to count.
Choose Insert, Summary
Change summary type to count, and the location should be Report Footer or Grand Total.
Click OK and the field will be placed in your Report Footer and you can move it to the Report Header if need be.

2. Create a new formula.
Add the following line to the formula editor and modify it with your field you want to use.

sum({table.field})

Save and Close
You can place this formula anywhere in the report that you like.

~Brian
 
Lee,

A quick way to get the total detail lines is to put the Special Field called "Record Number" in the report footer.

If the the total needs to be in the header then Brian's solution would be the way to go.
 
In Crystal 8.5, there are also Running Totals which can be selective in what they add.

Madawc Williams (East Anglia)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top