Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formula to loop over records? Post Reply Post New Topic
Author Message
jrhodes
Newbie
Newbie


Joined: 08 Jun 2010
Online Status: Offline
Posts: 9
Quote jrhodes Replybullet Topic: Formula to loop over records?
     Posted: 07 Dec 2010 at 3:51pm
Hi,

I have a Projects table which holds data on Projects. From the Projects table there is a 1 to many relationship to a Funding Source i.e. a Project can have many funding sources. Each Funding Source has a dollar value it is contributing to the Project.

I want to be able to list each project and the total dollar amount it has. Is it possible to create a formula (or some type of insertable field) that sums the total dollar amount? I can do this with Groups by grouping by Projects and insert the sum of the dollars in the group header but I would like to do this in the details section without using groups.

To put it another way: when I used to create OO (object oriented) reports to achieve the same thing I would create a method that looped over the funding sources and added them then returned the total value. Id then just include the method alongside the project information (if that makes sense).

Thanks for the help.
IP IP Logged
Rimsky
Newbie
Newbie


Joined: 04 Sep 2007
Location: Netherlands
Online Status: Offline
Posts: 3
Quote Rimsky Replybullet Posted: 14 Dec 2010 at 3:56am
Hi,
Just put the sum in the group header or footer and suppress the details section.

Hope this helps
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum