Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Display every hour of day in chart Post Reply Post New Topic
Author Message
aceledon
Newbie
Newbie


Joined: 03 Oct 2011
Location: New Zealand
Online Status: Offline
Posts: 3
Quote aceledon Replybullet Topic: Display every hour of day in chart
    Posted: 03 Oct 2011 at 12:54pm
Hi,
 
I've searched all around for an answer to my problem, but I don't seem to find it (or I don't know how to look for it).
 
I have a chart that shows record volumes per hour, populated by the formula field TimeValue({INCIDENT.INCIDENTTIME})
 
The issue is that sometimes there is no activity during some hours of the day, so the chart is not graphing the 24 hours I need to see. Example:
 
I see this:
 
52    45    78    23    56   23    75    34
1am 2am 3am 5am 6am 7am 9am 12pm....
 
I need to see:
52    45    78    0     23    56   23    0      75    0        0        34
1am 2am 3am 4am 5am 6am 7am 8am 9am 10am 11am 12pm... and so on
 
 
Do I explain myself?
Hope someone can help me with this one!
 
Cheers,
Andrea
 
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 03 Oct 2011 at 6:41pm
If {INCIDENT.INCIDENTTIME} = 0 then "0"
    else TimeValue({INCIDENT.INCIDENTTIME})

You may have to play with this a bit to get it exactly right because I am admittedly not real good with formulas.
IP IP Logged
aceledon
Newbie
Newbie


Joined: 03 Oct 2011
Location: New Zealand
Online Status: Offline
Posts: 3
Quote aceledon Replybullet Posted: 03 Oct 2011 at 7:50pm
Thanks for your quick reply. Is a good try, but that's not going to work, as I don't get blanks on that field. Will try to re-phrase it.

1. Every record has an Incident Time --> time that the accident happened.
2. My chart is counting records per each hour of the day
3. If there are no accidents between 2:00am and 2:59am, then the chart won't show "0" for 2am. Instead, will skip to the next hour showing records.

I'm trying to find a way to say something like "For each hour, count records. If no record, then 0", but I am totally lost about how to write the code for that.

Thanks
IP IP Logged
aceledon
Newbie
Newbie


Joined: 03 Oct 2011
Location: New Zealand
Online Status: Offline
Posts: 3
Quote aceledon Replybullet Posted: 13 Oct 2011 at 11:42am
Hi there, any light of how to make it work? Please?! Cry
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.016 seconds.