Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Counting groups with datediff formula Post Reply Post New Topic
Author Message
Needhelp
Newbie
Newbie
Avatar

Joined: 30 Nov 2012
Online Status: Offline
Posts: 13
Quote Needhelp Replybullet Topic: Counting groups with datediff formula
     Posted: 15 Jan 2013 at 8:04am
Hi I am hoping someone can help.

I have a group which has two date fields. I have worked out the maximum of the date fields, calculated the date difference for each and then displayed the smallest number to tell me how recently the groups record was conacted. I then have categorised the groups into a, b and c by the days since contacted e.g 10 days, 11 - 15 days etc. I now want to count the number of groups in each of these categorys as a summary. I used a running total for 10 days but 11 - 15 days is stumping me as I cannot get the running total formula to work to do this

ANy ideas of best way to do this?

Help much appreciated.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 16 Jan 2013 at 2:57am

Hi

 

I presume that Category is your first group and within you have some groups and would like to count / sum the groups within category.

 

 

Create the following running total formulas to arrive this.

 

Formula1  // Place this formula on your category group header

 

Whileprintingrecords;

Numbervar x:=0;

 

 

Formula2  // place this formula on your second group i.e. within category group

 

Whileprintingrecords;

Numbervar x:=x+1

 

Formula3  //Place this formula on your category group footer

 

Whileprintingrecords;

Numbervar x;

 

 

This will resolve your issue.

 

 

Thanks,
Sastry
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