Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Line chart for number of calls per 30mins interval Post Reply Post New Topic
Page  of 3 Next >>
Author Message
guan
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 17
Quote guan Replybullet Topic: Line chart for number of calls per 30mins interval
    Posted: 06 Aug 2009 at 2:51am
hi guys, i just started learning crystal report and im very very new to it

would u guys help me out with the current problem that i have

i really do not how or where to start.

i have connected the crystal report to ms access

it just has 1 table

qlog(no., call_in_time, call_in_date, name, telephoneNumber)

so basically my problem is, i wanna generate a line chart showing the number of calls in 30mins interval in one business day.

call_in_time is the time for when they called in
call_in_date is the date for when they called in.


thanks in advance!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Aug 2009 at 6:28am

**** Can you please delete out the extra posts you made that are a repeat of this one.

What are the field data types for CAll_in_Time and CAll_In_Date?
 
 
IP IP Logged
guan
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 17
Quote guan Replybullet Posted: 06 Aug 2009 at 6:36am
hi sorry about that, i didnt know how it happen to post 4 times.

i have set both of them as Text datatype

previously it was date/time, but i had some problems with it because
from crystal report it was showing both date AND time for both data field

i hope u understand wat i meant

thanks

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Aug 2009 at 6:47am
Are you flexible on the 1/2 hour interval to an hour interval?
Crystal has a built in function to group these at the hour level.
Go back to leaving the field as a DATETIME and do not split it into 2 text fields.
It is really straight forward although I do not know what you are graphing...a count of row  or a sum of  a field in rows or something else. I will assume it is a count of the rows in this sample:
Add a Chart (usually to your Report HEader).
The Chart Expert will open.
Click on the TYPE tab and select LINE chart.
Pick the one you want to use (either Line Chart or Line CHart with markers ...the two on the far left).
Click on DATA tab.
On Change of a add your DATETIME field.
now click on the DATETIEM field that is in the On Change of window. This willa ctivate the "Order" button.
Click on the Oder Button.
Change the This section will be printed: section to "for each hour" and click on OK.
Add your unique record field (usually a primary key) to the "Show value(s)" window.
Click on it to activate it and then click on the "Set Summary Operation" button.
Change the calcualte this summary to "DistinctCOunt".
Close it and chaeck out your graph
IP IP Logged
guan
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 17
Quote guan Replybullet Posted: 06 Aug 2009 at 6:53am
ah yeah i understand thanks!

how ever wat if i already have input 230++ data
and all of them are split into two data field
which is the call_in_time
and call_in_date ?

means i need to re edit all the data?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Aug 2009 at 7:07am
Try converting it via a crystal formula as:
Cdatetime({table.call_in_date} + " " + {table.call_in_time})
 
place this on your details and validate it is giving you the correct DATETIME per row.
If it is working use it to group on in the chart (per hour as noted above).
NOTE this all assumes you want it to trend it out per day per hour.
If you want it trending per hour only regardless of the day (meaning clump all of your 9-10 calls for every day all togther) then use another formula
as:
timevalue({table.call_in_time}) and use that to do the group on (per hour).
You can do both in the same report (not the same chart) if you want.
 


Edited by DBlank - 06 Aug 2009 at 7:09am
IP IP Logged
guan
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 17
Quote guan Replybullet Posted: 06 Aug 2009 at 7:21am
alright i will give it a try
thanks  a lot for your help!
IP IP Logged
guan
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 17
Quote guan Replybullet Posted: 06 Aug 2009 at 9:43am
i have pasted that formula below but it keeps sayin "A string is required here"

and it highlights this part of the formula {Qlog1.Call_In_Time})
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 06 Aug 2009 at 9:47am

if you place the {Qlog1.Call_In_Time} field on your report and hover over it with the cursor what field type is appearing in the parenthesis at the end of the pop up information?

IP IP Logged
guan
Newbie
Newbie


Joined: 06 Aug 2009
Online Status: Offline
Posts: 17
Quote guan Replybullet Posted: 06 Aug 2009 at 4:54pm
hey im very sorry for the wierd timing of replies, i really appreciate u helping me out here. btw im currently from singapore, and my last msg that i posted here was already midnite and i had to go to bed because i needed to wake up 5am =(. well TGIF today!

anyways..

i manage to solve the string problem, and i manage to follow all your steps
however when it is about to generate the chart, it says "bad date-time format string". i will try to troubleshoot it hahaha
IP IP Logged
Page  of 3 Next >>
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.035 seconds.