Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Chart on dates NOT in database? 1

Status
Not open for further replies.

rodbac

Programmer
Jun 21, 2001
23
US
I think this is a pretty simple task, but I am stumped...

Here's the scenario: I pull all records for a given (user input-ed) month from the db (let's say there's 13 of them). How do I create a chart that counts how many records there are for each day of the month, showing a null on the chart if there are no records for that day?

Thanks in advance for any help!

rodbac
 
It isn't easy to report on data that isn't there.

By chart do you mean bar chart?

You could create 31 conditional formulas that look for each day of the month, and then grand total each formula. You would get 31 grand totals that represent the 31 days. You can then chart theses, althought the names of the bars will not be pretty. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
I left this one alone for a while and now am back working on it. Thanks for your reply...

So if I make a formula for each day of the month (formula1, formula2, etc), how do I grand total each formula (run some kind of counter specific to that formula?) and how would I chart on the result? I am thinking a bit slowly today, so I apologize if I'm missing something elementary...

Thanks in advance! -rodbac
 
formula 1 would be:

If Day({date}) = 1
then 1
else 0

Put this on the detail, select it and use Insert-Grand Total.

Repeat for each day of the month.

On the chart data tab select an Advanced (or Detail) chart layout.
Put each grand total in the "fields to summarize" box. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
I had this exact same issue and resolved it by creating a new table with every possible date in it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top