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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show data in the graph for each week even if 0

Status
Not open for further replies.

russula

Programmer
Nov 30, 2006
33
DE
Hello All!

Please help! Our managers like nice pictures and think that it is most important thing :)

CR XI. I have data for several days, I need to group it weekly and then show in the graph. The problem is - not for every week we have data. In this case I MUST show week number but with 0.
At the moment I calculate week number in the formula week_number:
DatePart ("ww", {table.date_field})
and then show graph for "change of" @week_number. And in this case I don't have all weeks but only weeks with data. Is there any solution to show all weeks?

Thanks a lot.
 
No Data and Zero are 2 entirely different things.

Crystal does not report on non-existent data. So you are going to have to get a data source that has every single week in it, even if the value is zero.

A common way to do this is to get a date table that contains all dates - even if you have to create that table yourself - and left outer join it to the table you are currently using to get your data on the date field. Then use the date from this new table, not your existing table, to show up on the graph.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Thanks, dgillz, that's what I thought to do but was hopping there is any other way. The report is done for one year until current_date, that means, I have to use week number together with year (for example, 2007 week 23). Additionally, report should be scheduled monthly, I have no idea for how long time. So, data source with week number should be generated dynamicly based on the current date. Too many things only to get 0 in the graph :)
 
Dan,

Will this product solve his problem? The statement "has some macros that you might find useful" isn't real clear. What exactly does the product do?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"What version of URGENT!!! are you using?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top