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

Display End of Week Date When Grouping data by Week

Status
Not open for further replies.

drunk8gods

Technical User
Sep 27, 2013
5
US
Hoping someone can help me out.
I'm running a report that is grouping data weekly. Crystal Reports always displays dates by the beginning of the week (Sunday). I'd need it to display the end of the week (Saturday) without modifying the grouping of data for that week. By that I mean, the counts need to remain Sun-Sat but the date displayed for the week should be Week Ending instead of Week Beginning.

Optimally I'd like to have this as a formula so that I can use it to group in a chart displaying end of week as well.

Any help would be greatly appreciated.
 
Are you referring to the Group Title that's automatically generated in the Group Header?
The easy solution is to go to the Sort Expert, and below your Group name add the date and make the sort descending
 
Thanks for replying, Charliy.

I'll see if I can explain my issue more clearly if I can display it.
Currently, I'm pulling data and grouping it by week (Sunday-Saturday). The group header is displaying the first day of the week (Sunday), like below

Item Count
09/01/2013 5
09/08/2013 6
09/15/2013 14
09/22/2013 12
09/29/2013 6


What I would like the group header to display is the last day of the week (Saturday), like below:

Item Count
09/07/2013 5
09/14/2013 6
09/21/2013 14
09/28/2013 12
10/05/2013 6

Notice that it does not change the way the data is counted within the group (still being counted as Sunday-Saturday for the group). Only the date displayed is the end of the week and not the beginning.

Any suggestions?
 
try this:

Right click in the left bar on the group whose name you want to change and select Change Group
Click on the Options tab
Check Customize Group Name Field
Select Use Formula As Group Name
Click on the Formula Edit button
Enter is something like: Dateserial(year({Table.GroupField}),month({Table.GroupField}),day({Table.GroupField})+6)



Apologies in advance if i missed an important detail, totally misunderstood or have it just plain all wrong. I have had my coffee so have no excuse except that i do not have crystal in front of me to test anything.
 
Move your totals from the Group Header to the Group Footer.

Do not use the generated Group Title, just put the date field, or use a formula that's maximum({date_filed},{@group formula})
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top