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

Bar chart - bars for every n-th day

Status
Not open for further replies.

mehlsl

IS-IT--Management
Jan 30, 2002
22
0
0
US
Hello --

A bar chart will show counts of comments made by customers (Y-axis) by day during a period of time (X-axis).

Instead of showing bars for each day in the period, is there a way to show the bar for every n-th day?

Thanks for any help.

Larry Mehl
 
In Crystal 10, you can define groups as being groups of several days - easily by weeks and months, or code it yourself for other intervals. I did an entire report that had month-intervals for recent times and whole years for older data. This also produced a satisfactory bar chart.

This may not be possible in older versions of Crystal. It always helps to give your version.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
This is a little unclear. Do you mean you want to show selected data and show only the count of comments on every fifth day? Or do you mean you want to cluster the days so that total comments for five day intervals are clustered together?

-LB
 
Thank you both for responding.

Madawc --

This looks like a method to cumulate the count over the days in the interval, rather than "sampling" the count for each n-th day. Am I right?

We are using CR 10. Sorry for the omission.

lbass --

Sorry for the fuzziness.
We want to show a bar representing only the count of comments on every fifth day.

Larry
 
If you only want a selection of days, then put a command in Record Selection to exclude records for other days. Something like
Code:
if DatePart("d", {your.date}) in [4, 8, 12, 16, 20, 24, 28]
That gets days of the month.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
If you have a five-day work week, a simple approach would be to use a record selection formula like:

dayofweek({table.date}) = 3 //or any number from 2 to 6 if a M-F work week

If you can't use this in the main report, then insert a subreport where you limit the dates to a particular day of the week.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top