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!

Weekly Grouping in a Crosstab (Crystal 6.0)

Status
Not open for further replies.

bpunc

Technical User
Oct 30, 2001
5
US
I want to group on a "weekly" basis in a crosstab. I will have two parameters (start date of the qtr and an end date of the qtr). The word "weekly" is in quotations since sometimes the last week of the quarter will contain more than 5 business days. This is due to the fact that each quarter is divided into 13 weeks. (e.g., the last week of Q1 2003 had 6 business days, the last week of Q2 2003 will have 6 business days, the last week of Q3 2003 will have business 7 days, and the last week of Q4 2003 will have 8 business days.) Is this grouping possible in Crystal 6.0?
 
After you add your date field to the crosstab, select group options->specified order, and then you can define your "weeks" as you wish.

-LB
 
Not sure if specified order is available for Cross-tabs in v6. There might even be a group options button that allows you to set the 'break' to each week.

If all else fails write the following formula:

{Date} - DayOfWeek ({Date})

Then group on the fomula. This will be the previous Saturday of any date. Add a number between 1 and 7 to this formula to make it any other day of the week.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top