Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Help with formula? Post Reply Post New Topic
Author Message
hugo69
Groupie
Groupie


Joined: 15 Feb 2010
Online Status: Offline
Posts: 53
Quote hugo69 Replybullet Topic: Help with formula?
     Posted: 30 Mar 2010 at 6:59am
Is there any way of making a formula to group per month. If I only have these two fields.
 
Example would be this:
 
{Jail_Confinement.Date_Confined}  and {Jail_Confinement.Date_Released}
 
If the Inmate was Confined in January, Feb and so on? Need to do a year of inmates that were confined per month.
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Mar 2010 at 7:09am
Do you mean you need to count them for each month confined or do you mean you you need to count them once for the month they began confinement?

Edited by DBlank - 30 Mar 2010 at 7:09am
IP IP Logged
hugo69
Groupie
Groupie


Joined: 15 Feb 2010
Online Status: Offline
Posts: 53
Quote hugo69 Replybullet Posted: 30 Mar 2010 at 7:22am
Count them for each month that they were confined.
 
So if Jim was confined in January and stayed until March, he would be counted in each month.
 
Does that Help?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Mar 2010 at 7:36am

Unless you ran sub reports you would not be able to group them per month. Once you group a row that is the only place it shows up.

You could use running totals to show a count per month?
Will that work?
If so is this a dynamic report that will based on user input?
IP IP Logged
hugo69
Groupie
Groupie


Joined: 15 Feb 2010
Online Status: Offline
Posts: 53
Quote hugo69 Replybullet Posted: 30 Mar 2010 at 8:08am
How would RT show the count per month?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Mar 2010 at 8:18am
You create one formula per month and place it on the Report Footer to show your values.
RT Name= Jan
Field to SUmmarize=InmateID
Summary Type = DistinctCount
Evaluate= Use a formula
{Jail_Confinement.Date_Confined} <=Date(2009,1,31) and (isnull({Jail_Confinement.Date_Released}) or {Jail_Confinement.Date_Released}>Date(2009,1,1))
Reset=Never
 
 
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