Print Page | Close Window

Number of record in a group

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=9336
Printed Date: 01 May 2024 at 6:26pm


Topic: Number of record in a group
Posted By: Shushkov
Subject: Number of record in a group
Date Posted: 09 Mar 2010 at 10:43am
Hi,

My report contains 2 nested groups (deparments and in each department are employees). For each employee it's a list of phone calls that user made.
I need to enumerate these records for each group, so first field must be record number and then information about call. I tried to use function RecordNum but number of record doesn't reset from one group to another, it continues.
Can I reset the RecordNum of mayber there is another function for my purpose?

Thank you!



Replies:
Posted By: DBlank
Date Posted: 09 Mar 2010 at 11:28am
YOu can use the Insert Summary (Sigma sign in the upper left corner) function and have it count any field and reset on the group.
Likely you want a count of calls per employee so do a Count on any fiel dfrom Calls (if there is a PK use that and do a DistinctCount) with the Summary Location as G#2. 
If you want a count of all calls per department do the same thing but make the summary location G#1.
For all calls int he report same thing but location is Report Footer.


Posted By: Shushkov
Date Posted: 09 Mar 2010 at 11:48am
Thank you for reply!

CR doesn't allow me to move summary field into details section of report.

My report is like this:

Sales
   John
      19.02.2010   123
      20.02.2010   456
   James
      19.02.2010   123
      20.02.2010   123
      20.02.2010   456
Engineers
 .......

And I need
Sales
   John
       1   19.02.2010  123
       2   20.02.2010  456
   James
       1   19.02.2010  123
       2   20.02.2010  123
       3   20.02.2010  456
Engineers... and so on.



Posted By: DBlank
Date Posted: 09 Mar 2010 at 12:05pm
You just want a counter?
Create a Running Total as "Counter"
Field to Summarize=EMployee field
Type of Summary = Count
Evaluate= For each Record
Reset=On Change of Group (select group 2 /employees)
Place on Details section
 


Posted By: Shushkov
Date Posted: 09 Mar 2010 at 12:17pm
DBlank, thank you!

It is work as I need!




Print Page | Close Window