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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help.
You might check this link. It has an example for doing what you want
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233343335333233303334%7D.do
Link to example
https://websmp130.sap-ag.de/sap/support/sapnotes/public/services/attachment.htm?iv_key=002007204200001252162008&iv_version=0001&iv_guid=DD73A4F2D3DE00F1B8490018FE7F5DE2
mlmcc
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233343335333233303334%7D.do
Link to example
https://websmp130.sap-ag.de/sap/support/sapnotes/public/services/attachment.htm?iv_key=002007204200001252162008&iv_version=0001&iv_guid=DD73A4F2D3DE00F1B8490018FE7F5DE2
mlmcc
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!)
(Ain't it wonderful how SAP manage to make the URL longer than the article it points to!)
ASKER
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
James
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