Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: problem with sum Post Reply Post New Topic
Author Message
bepo
Newbie
Newbie


Joined: 11 Oct 2007
Online Status: Offline
Posts: 1
Quote bepo Replybullet Topic: problem with sum
    Posted: 11 Oct 2007 at 12:25am
Hello!
In database I have two tables:

Students (idStudent, name, surname, dateOfBirth, schoolFee, numberOfRates)
Student(idStudent, rateNumber, amount, dateOfPay)

In crystal report I want to display all students, and they sum of payment of schoolfee but only if dateOfPay is within last month.

name surname dateOfBirth schoolFee @SumOfStudentAmounts

It is easy to display all students information, but I don't know how to create formula that will calculate what sum of amount did student payed?

How to create that formula (@SumOfStudentAmounts)?


Thanks!

Josip
IP IP Logged
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Posted: 11 Oct 2007 at 5:42am
I think I'd use a Running Total. rather than a formula.
First Insert a Group on idStudent. 
Then for theRunning total,  sum the Amount .
Evaluate using a formula based on the DateofPay to only select those within the period you want.
Reset on change of group, ie for each student 
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.