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

unusual time intervals

Status
Not open for further replies.

c8ltgkue

MIS
May 1, 2007
57
GB
Hi All

Using CR XI

I have to create a report where the grouping on the time interval doesn’t fall into any options provided in Crystal. I need to run the report for the time period of 6 weeks. My time series looks like the following. It’s block of 6 weeks and then one week is added to the start and end date to create the next time series of 6 weeks.

20th Oct to 28th Nov 2008
27th Oct to 5th Dec
3rd Nov to 12th Dec
10th Nov to 19th Dec
17 Nov to 26th Dec
24 Nov to 2nd Jan 2009
1 Dec to 9th Jan
8 Dec to 16 Jan
15 Dec to 23 Jan


Do I need to use formula for this or is there any simpler way of achieving this?

Thanks for you help in advance.

C8
 
You could use week number, e.g.
Code:
DatePart ("ww", {date1})
That gives a number, 01 to 53, with adjustments possible to start in some non-standard way

You could then group them. Simpler than doing the dates.

Also consider using DateDiff from your current date, so that it will automatically adjust for future runs.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
You can't group records into these ranges, because they overlap. You can't have one record in two different groups. You would have to do conditional totals for each group or create a series of subreports that run based on a weekly group.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top