Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Traffic Data Crunching Post Reply Post New Topic
Author Message
traffic
Newbie
Newbie


Joined: 18 Jun 2009
Location: United States
Online Status: Offline
Posts: 2
Quote traffic Replybullet Topic: Traffic Data Crunching
     Posted: 18 Jun 2009 at 8:36am

I am trying to create a report that takes vehicle traffic data from a source similar to the table shown below:

Date Time Agency Station ID Total Volume
5/28/2009 5:15 MI270E000-8D 232
5/27/2009 5:15 MI270E000-8D 228
5/26/2009 5:15 MI270E000-8D 259
5/22/2009 5:15 MI270E000-8D 233
5/21/2009 5:15 MI270E000-8D 252
5/20/2009 5:15 MI270E000-8D 264
5/19/2009 5:15 MI270E000-8D 237
5/18/2009 5:15 MI270E000-8D 246
5/15/2009 5:15 MI270E000-8D 208
5/14/2009 5:15 MI270E000-8D 248
5/13/2009 5:15 MI270E000-8D 248
5/12/2009 5:15 MI270E000-8D 222
5/11/2009 5:15 MI270E000-8D 234
5/8/2009 5:15 MI270E000-8D 197
5/7/2009 5:15 MI270E000-8D 225
5/6/2009 5:15 MI270E000-8D 210
5/5/2009 5:15 MI270E000-8D 219
5/4/2009 5:15 MI270E000-8D 238
5/1/2009 5:15 MI270E000-8D 210
5/29/2009 5:15 MI270E000-8D 216
5/28/2009 5:30 MI270E000-8D 324
5/27/2009 5:30 MI270E000-8D 335
5/26/2009 5:30 MI270E000-8D 361
5/22/2009 5:30 MI270E000-8D 315
5/21/2009 5:30 MI270E000-8D 347
5/20/2009 5:30 MI270E000-8D 381
5/19/2009 5:30 MI270E000-8D 330
5/18/2009 5:30 MI270E000-8D 346
5/15/2009 5:30 MI270E000-8D 300
5/14/2009 5:30 MI270E000-8D 328
5/13/2009 5:30 MI270E000-8D 280
5/12/2009 5:30 MI270E000-8D 348
 
This data continues on for dozens of other "Agency Station ID's" and dates and times.
My final output needs to be a table that looks somthing like this:
 
Average Volume per sensor per time
Time
5:15 5:30 5:45 6:00
ID's MI270E000.8D 231.3 328.4 391.825 492.6
MI270E001.8D 141.1 200.95
 
I've tried several options such as Cross-tab reports, and using group summaries in a traditional query, with no luck.  I consistenly am getting all data from the data source as an output from the query, when I really only want the average volume for each timeframe for each sensor.
 
Thanks for your help!
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 18 Jun 2009 at 9:17am

A crosstab should do that for you. How did you have it set up? I would think it should be set up as:

Column as Time field
Row as ID field
Summary field on Volume set as an average
IP IP Logged
traffic
Newbie
Newbie


Joined: 18 Jun 2009
Location: United States
Online Status: Offline
Posts: 2
Quote traffic Replybullet Posted: 18 Jun 2009 at 2:10pm
It worked!  I think I just has the columns set as "per day" rather than "per minute".
 
Thanks again for the help.
 
Now I just need to figure out a way to automatically create charts for each ID with volume as the y-axis and time as the x-axis...
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Jun 2009 at 7:02am

Are you trying to do a bar chart for the second one? If so, group on the ID field, place the bar chart on the GH of GF (or add a GHb and put it there).

For the chart:
type set as bar
Data; on change of as Minutes set to MINutes, Show Value as Volume set summary as ???? average, sum or whatver you are looking for.
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