Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Calculating Details Records in Header Post Reply Post New Topic
Author Message
hummy
Newbie
Newbie
Avatar

Joined: 23 Jan 2008
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote hummy Replybullet Topic: Calculating Details Records in Header
     Posted: 27 Feb 2008 at 7:04am
Hi All...
 
I've got a report spec which i am trying to work towards and one of the requirements of the spec is that the number of particular records is calculated in the header section of the report with more informative view on each record in the details section.
Since the records are loaded after the header how is it going to be possible to calculate certain types of record in the header section.
 
For example, the report details a list of current issues in various states.
The first page of the report is to be a title sheet and contain a count of the number of records in New State, Open State & Closed State.
 
I can have running totals to caluclate these but these would get calculated in the footer. If i move them to the header then the values are zero. So my question is how do i do a count of particular records within the header section of a report.
 
THanks
IP IP Logged
rahulwalawalkar
Senior Member
Senior Member
Avatar

Joined: 08 Jun 2007
Location: United Kingdom
Online Status: Offline
Posts: 731
Quote rahulwalawalkar Replybullet Posted: 27 Feb 2008 at 7:09am
Hi,
 
Create a Subreport using the same tables as the main report with just the running totals in that Subreport  ,then place that subreport in the report header of the main report.Also you may need to use Shared Variables.......
 
Some sample data will be helpful......
 
Cheers
Rahul


Edited by rahulwalawalkar - 27 Feb 2008 at 7:10am
IP IP Logged
hummy
Newbie
Newbie
Avatar

Joined: 23 Jan 2008
Location: United Kingdom
Online Status: Offline
Posts: 4
Quote hummy Replybullet Posted: 27 Feb 2008 at 7:48am
ah yes of course...sub-reports. Why didn't i think of that.
 
Thanks
IP IP Logged
mpalecek
Newbie
Newbie
Avatar

Joined: 28 Feb 2008
Location: United States
Online Status: Offline
Posts: 9
Quote mpalecek Replybullet Posted: 28 Feb 2008 at 9:44am
Couldn't you also use a calculated SUM field? The idea of a running total field is to give you a total at that point where the RT field is put in. So in a detail section it would count up, but when it is in the header there is nothing there yet.
 
But a SUM (or count etc.) field should calculate after the report is done giving a total in the header.
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