Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Stacked bar conundrum Post Reply Post New Topic
Author Message
zaroblan
Newbie
Newbie
Avatar

Joined: 04 Nov 2008
Location: South Africa
Online Status: Offline
Posts: 5
Quote zaroblan Replybullet Topic: Stacked bar conundrum
    Posted: 29 Apr 2009 at 5:12am
Greetings,

I am trying to figure out how to use Crystal Reports 2008 to display a stacked bar where certain of the segments are to have the same colour to indicate a state.

For example on a machine being used for 24 hours:
00:00 - 06:00 Inactive
06:00 - 10:00 Active
10:00 - 10:15 Overuse
10:15 - 12:00 Active
12:00 - 13:00 Inactive
13:00 - 15:00 Active
15:00 - 16:00 Inactive
16:00 - 1700: Active
17:00 - 18:00 Overuse
18:00 - 00:00 Inactive

I would like to display a stacked bar where Inactive would be white, Active would be green and overuse would be red.

For a large numer of machines from a management viewpoint you could quite easily see what the usage of the machines was.

Please can you help?

Thanks,
Robert
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Apr 2009 at 6:45am
I assume you want to stack this based on total time for each instance grouped on the 3 categories. I also assume your sample data above is 3 different fields, Start tiem, stop time and status.
First you will need to get your difference in time.
if your first two items are datetime fields you can use a datediff in a formula to get your total minutes. Called "Minutes" for this example:
datediff("n",{table.starttime},{table.enddtime})
I think for your chart you will need to select a stacked bar chart, on change of probably is Machine # and second the Active/Inactive field. Show value as the formula field {@Minutes} set to summary as a SUM.
You might have to play around with this a bit depending on your overall design needs but hopefully this will get you on a good track.
IP IP Logged
zaroblan
Newbie
Newbie
Avatar

Joined: 04 Nov 2008
Location: South Africa
Online Status: Offline
Posts: 5
Quote zaroblan Replybullet Posted: 29 Apr 2009 at 7:24am
Almost what I had in mind.
I want the ba to be stacked in chronological order.
That is first a white block, then a green, then a red, then a green again, then a white, then a green ... as per the timeline shown above.
I need the blocks to be stacked in order and not as totals.
Is this possible?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Apr 2009 at 8:18am
Not sure about this one. Stacked bar charts generally are used to group like data together into another group. Perhaps you can group on a Computer # then unique line record with the SUM of the time and try to conditionally highlight the records for you Green, Red, White but I am not sure that the highlighter will work that way.
IP IP Logged
Dan3D
Newbie
Newbie


Joined: 25 Feb 2007
Location: United States
Online Status: Offline
Posts: 33
Quote Dan3D Replybullet Posted: 11 May 2009 at 8:57pm
If all elese fails, this kind of process control chart could be done with our CRChart add-in for Crystal Reports.
 
-Dan
 
disclaimer: I work for the company, threedgraphics.com, that makes this product. This product costs money.
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.031 seconds.