Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Running Total Problem Post Reply Post New Topic
Author Message
yggdrasil
Senior Member
Senior Member
Avatar

Joined: 19 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 150
Quote yggdrasil Replybullet Topic: Running Total Problem
    Posted: 01 Oct 2007 at 7:38am
The detail line of my report shows data for a student with several events over a period. This is grouped by student.
 
In the footer, I am asked to total the number of types of student in  8 different tables (eg males/females, ethnicity etc) some of which are per type of school.
 
This is ok until some student is in two schools of different types during the period.  Now the running totals count him twice, and the totals in any table don't match the rest of the report where the type of school isn't involved.
 
 What they want is to only count him in the school type at the latest dated event in the period. Is there any way to do this using running totals?
 
Some of this data needs subreports to extract, I am already 'manually' summing the data from these because I cannot use sub-subreports or running totals here, so I do not want to have to create another couple of dozen formulae unless really necessary. There are nearly 200 already!
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 01 Oct 2007 at 9:57am
What I would do is create a global array and add the student to the array (I've done this before for similar problems). Then use the IN operator to see if the id is already in the array. If not, count him and add him to the array. If so, skip him. Works pretty well and it's a simple formula.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
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: 02 Oct 2007 at 1:13am
I see what you are getting at, but I can't see how to do it. None of my reference books or on-line help describe how to create an array other than with a list of given values. I'm using Crystal 10, does that make a difference?  And if I did have an array of all student ids, how would I decide that the student was included in the count for the latest school type. I can't sort them until they are in the grouping.
IP IP Logged
dada.dhumal
Newbie
Newbie


Joined: 03 Oct 2007
Location: India
Online Status: Offline
Posts: 4
Quote dada.dhumal Replybullet Posted: 04 Oct 2007 at 1:44am
create formula filed ( give condition)
summerize formula filed in running total field.
hope this works.
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.