Link to home
Start Free TrialLog in
Avatar of a_rediron
a_rediron

asked on

How to add dates with no data to a chart

I have a question about Crystal Report chart formatting.  I have a chart that has dates as the x axis.  I get all the data from a Database.  If my dates on the X axis are months from the year 2008 but there is no data in the DB from May 2008 that bar in the chart is missing instaed of blank (this is expected since there was no data in the DB for May).  Is there a way to get all dates in the date range to be included in a chart even if there is no data for them?

ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of James0628
James0628

To just restate what Peter said in a different way:

 No, there doesn't appear to be any way to get CR charts to fill in missing dates.  Your data has to include every date that you want to appear in the chart.

 I don't need/expect any points for this.  I just thought I'd reword, and confirm, what Peter already told you.

 James
Avatar of a_rediron

ASKER

Thanks for your help.
That's an interesting link _I'll take a look too.

(Ain't it wonderful how SAP manage to make the URL longer than the article it points to!)
Thanks for the link.  I will take a look.
Thanks for that, mlmcc.  Now that you mention it, I think I've seen that approach mentioned here before, but I'd forgotten about it.  Creating a table with all dates would probably be the best solution in most cases, but if you can't, or don't want to, do that, this provides an alternative.

 James