Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Grouping by Week Post Reply Post New Topic
Author Message
AndrewMauk
Newbie
Newbie


Joined: 23 Jul 2008
Online Status: Offline
Posts: 2
Quote AndrewMauk Replybullet Topic: Grouping by Week
    Posted: 23 Jul 2008 at 8:17am
I very new to Crystal Reports and I'm trying to figure how to do some different things.  So far I feel like I've been able to figure out a lot on my own and using the help function.
 
However, I'm having issues with date groups.  I'm trying to build a report for time cards that will calculate overtime based on 40 hours per week.  I've gotten all the calculations figured out, I just can't get it to group the weeks properly.  The problem I'm having is that Crystal Reports defults with Sunday as the start of the week, but our week starts on Monday.  I'm running the latest version of Crystal Reports.
 
Thanks for any help!
IP IP Logged
Countrystyle
Newbie
Newbie


Joined: 25 Jan 2008
Online Status: Offline
Posts: 5
Quote Countrystyle Replybullet Posted: 23 Jul 2008 at 11:49am
In the group expert, click on the options tab and then within the 'Common' tab, select 'in specified order'.  Follow the steps from there and that should solve your problem.
IP IP Logged
AndrewMauk
Newbie
Newbie


Joined: 23 Jul 2008
Online Status: Offline
Posts: 2
Quote AndrewMauk Replybullet Posted: 24 Jul 2008 at 11:19am
Unless I'm missing something, that won't quite work for me.  Playing around with that it wants each specific date to be included in the group.  I'm looking to do something more dynamic as I have to run this report everyother week.
 
I want to take a two week period of time dates and group it first according to Employee name (which I have), and then group them into week periods which are specific only to days of the week (I want them to be Monday through Sunday) not specific dates, which is the only way I can figure out to use the "Specified Group."
IP IP Logged
Countrystyle
Newbie
Newbie


Joined: 25 Jan 2008
Online Status: Offline
Posts: 5
Quote Countrystyle Replybullet Posted: 25 Jul 2008 at 5:30am
The only other way I can think of is to write a formula using the 'dayofweek' formula to determine the numeric value of the day of the week.  You can then assign names to the values and then group by week periods.  You may have to add a month and year formula if you want then separated even further.
IP IP Logged
akira_nagasaki
Newbie
Newbie


Joined: 04 Jun 2009
Online Status: Offline
Posts: 1
Quote akira_nagasaki Replybullet Posted: 04 Jun 2009 at 8:01pm
Originally posted by Countrystyle

The only other way I can think of is to write a formula using the 'dayofweek' formula to determine the numeric value of the day of the week.  You can then assign names to the values and then group by week periods.  You may have to add a month and year formula if you want then separated even further.


try this..

{CUSTOMER_ORDER.DATE_ENTERED} = your field group by weekly.

dateadd("ww",datepart("ww",{CUSTOMER_ORDER.DATE_ENTERED}, crMonday)-1,
date(year({CUSTOMER_ORDER.DATE_ENTERED}),1,1)-dayofweek(date(year({CUSTOMER_ORDER.DATE_ENTERED}),1,1),crMonday)+1)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.