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!

Grouping by week in Crystal 2013 1

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
161
US
I want to group a date by a week. So I want any Wednesday to the following Tuesday to group as one week

example:
W 1/3/15
Th 1/4/15
F 1/5/15
Sa 1/6/16
Su 1/7/16
M 1/8/16
Tu 1/9/16
W 1/10/16
Th 1/11/16
F 1/12/16
Sa 1/13/16
Su 1/14/16
M 1/15/16
Tu 1/16/16

I want to show up as
1/3/15 - 1/9/16
1/10/16 - 1/16/16
 
Create a Formula:
Code:
{Table.Date} - 3
Create a Group based on the Formula
Right Click the Group and choose Change Group.
On the Options Tab choose Customize Group Name Field:
Choose Use a Formula as a Group Name:
Code:
ToText ({Table.Date}, 'ddd dd MMM yyyy') & ' - ' & ToText({Table.Date}} + 6, 'ddd dd MMM yyyy')

Gordon
Crystalize
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top