Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Bar Chart and data order Post Reply Post New Topic
Author Message
jdathey
Newbie
Newbie
Avatar

Joined: 30 Aug 2011
Location: United States
Online Status: Offline
Posts: 3
Quote jdathey Replybullet Topic: Bar Chart and data order
    Posted: 30 Aug 2011 at 4:00am
I'm creating a percent bar graph to graph how long it takes a buyer to answer invoice cost messages.  I created a formula to categorize the number of days as follows:
 
0 days
1-7 days
8-14 days
15-21 days
22-28 days
29+ days
 
In the graph each aging category is stacked on each other for a rolling 12 months and I've sorted the categories so that 0 days is on the bottom and 29+ days is on top.  The problem is that if a buyer doesn't have any data in the 0 days category in the first bar (month 1), each successive bar will start with the next category even if that month had 0 days data. Below is the graph.
 
 
How can I force the sort order even if not every month contains data in each category.
Jon
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Aug 2011 at 4:18am
you need a source table with your 'days options' that you need outer join to your actual sales data and then use the new source data as your grouping
IP IP Logged
jdathey
Newbie
Newbie
Avatar

Joined: 30 Aug 2011
Location: United States
Online Status: Offline
Posts: 3
Quote jdathey Replybullet Posted: 30 Aug 2011 at 4:24am
So you're saying that in order to show up on the graph my source data has to actually contain each category even though 0 days category has zero instances?
Jon
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Aug 2011 at 4:30am
correct. In order to include the 'group' in chart a row of data must exist that has that 'group value', even if the field you are counting or summing is null.
IP IP Logged
jdathey
Newbie
Newbie
Avatar

Joined: 30 Aug 2011
Location: United States
Online Status: Offline
Posts: 3
Quote jdathey Replybullet Posted: 30 Aug 2011 at 4:36am
I guess I knew that but I would think that the next month would show the proper sort order, instead of placing 0 days 3rd in the stack, even though the previous month had no data in the 0 days category.
Jon
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Aug 2011 at 4:48am
oops.
I misunderstood and was reading it that you want to show all possible values (regardles if therr were any rows for a value) rather than keeping the sorting in a specified order in a stack.
I have never had good luck with specified order. I usually try and fake the groups into the alpha order I want. try adding a space in front of the first 3 group text strings you are using.
 
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.