Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Show All Dates in a Chart Post Reply Post New Topic
Author Message
vcs1161
Newbie
Newbie


Joined: 03 Mar 2010
Online Status: Offline
Posts: 33
Quote vcs1161 Replybullet Topic: Show All Dates in a Chart
     Posted: 29 Jun 2011 at 4:29am
I have my Crystal report grouped and within each group I need to create a chart.  That is not my problem.  I have been asked if I can include all the dates in a bar graph even if there is not data for that date within that group.  Each bar graph fluctuates based on the data measured for each date and that group.  Is there a way to make the bar graph show all the dates from my result set for all the groups?  And if there is no data for that date then you can visibly see it at zero rather than the date not showing at all?
 
Been struggling with this one.  Confused
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Jun 2011 at 4:43am
your source has to include all the dates
usually people end up with a dates table that they outer join to
IP IP Logged
vcs1161
Newbie
Newbie


Joined: 03 Mar 2010
Online Status: Offline
Posts: 33
Quote vcs1161 Replybullet Posted: 29 Jun 2011 at 8:05am
I was afraid of that and I was able to build the full table to include all with our without dates.  Although I have another question.  I want to group the bars in the graph by weekday then by each individual date.  Is there a way to show both labels in the X axis?  I can only seem to show the Weekday then each date is identified in the legend.  We would ideally like to have each date in the x axis horizontally below each bar in the chart. 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Jun 2011 at 8:08am
are you doing stacked bar charts on teh weekday?
IP IP Logged
vcs1161
Newbie
Newbie


Joined: 03 Mar 2010
Online Status: Offline
Posts: 33
Quote vcs1161 Replybullet Posted: 29 Jun 2011 at 8:31am
I am not.  They would like to see a bar for each date that fall in that weekday group.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 Jun 2011 at 8:41am
maybe you can get it to show as a data label on the bar but I think it will turn into a mess.
I don't know of a way to do it as an x axis label as a second level group.
If you got creative in a text formula to use as your x axis group (rather than double grouping on weekday and date as a day) ...
IP IP Logged
vcs1161
Newbie
Newbie


Joined: 03 Mar 2010
Online Status: Offline
Posts: 33
Quote vcs1161 Replybullet Posted: 29 Jun 2011 at 9:21am
Yep, scary minds must think alike. (kidding)  I was working on that piece as a last resort.  So that is what I did.  But I also had to sort my result set by weekday then date in my code and selected the order of the "change on" to be in the Original Order and not Ascending.  That way the dates after each weekday stay in the order I need them to be and Crystal won't rearrange the order.  So my formula is written to display it as an example of Wed 6/29/2011. 
 
It seems to be working and I will need to let my end user know that this is the best I can do.  Thank you so much for your time.
IP IP Logged
CoachGBT
Newbie
Newbie


Joined: 08 Apr 2011
Online Status: Offline
Posts: 29
Quote CoachGBT Replybullet Posted: 17 Nov 2011 at 4:43am

How did you write your formula to display date as an example of Wed 6/29/2011?

Thanks,
CoachGBT
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