Joined: 17 Mar 2011
Online Status: Offline
Posts: 6
Topic: Group By Week that start in the Monday Posted: 14 Feb 2012 at 7:15am
I need to do a report separated for weeks. I create a Group for the date, in crescent order for every week.
But the Crystal assumes the weeks start in the Sunday, but i need that it start in the Mondays...It´s possible ?
Joined: 17 Mar 2011
Online Status: Offline
Posts: 6
Posted: 15 Feb 2012 at 2:59am
Originally posted by kostya1122
you could do it manually like
if table.date in date(monday) to date(sunday) then "week 1" else
...
But in this case, if i search an interval of 1 year, i have to write conditions for every weeks in the year...The crystal automaticaly grops for weeks, but the week begin in Sunday...I just need to change the begin to monday.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 15 Feb 2012 at 3:54am
I do not know how to make the default date grouping use a different day of the week to as the start.
A few thoughts as other solutions...
Use datepart('ww',datefield,crmonday) to extract your week value based on your crmonday need and extract the year then add these togther in a text string to use as grouping.
or
maybe just subtract 1 day from your date field dateadd('d',-1,datefield) and group on that instead of your db date field.
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