Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Count By Month By Hour Post Reply Post New Topic
Author Message
Nanab
Newbie
Newbie


Joined: 20 Oct 2009
Online Status: Offline
Posts: 1
Quote Nanab Replybullet Topic: Count By Month By Hour
     Posted: 20 Oct 2009 at 2:15pm
Need Help
I am trying to produce a report that count the number of incidents for a month by hour.
I would like to use the timestamp to count the number of incidents inserted into the database and pull the time from timstamp to place in the correct category.
Example
          Month & Year: October, 2009
Time Reported        # Of Incidents Reported
 7:00 AM                            10   
 8:00 AM                            12   
 9:00 AM                            18  
10:00 AM                           20   
11:00 AM                           30
12:00 PM                           25 
 1:00 PM                            15   
etc.    
What would be the best way to approach this? Anyone have any examples????       
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 20 Oct 2009 at 2:21pm

Group 1 on the Incident date field and set to 'For Each Month' (this also includes the year)

GRoup 2 on the Incident Time field (can be the same as the date if it is datetime field) and set to 'for each hour'.
add a Summary Function of the DISCTINCTCOUNT(incdentID, group2)
Place on GH2
Suppress details and group footers.


Edited by DBlank - 20 Oct 2009 at 2:22pm
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