I'm generating an overtime report, and while Crystal Reports can group an employee's shifts into weeks, it uses a standard Sunday-Saturday week; I need a Monday-Sunday week(ie, Sept 12-18th inclusive). Is there any way to change this setting, or am I stuck with writing a complex formula?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
I don't know of a setting that will allow you to do this, but the group formula is not too bad. The following will give you the week number/index in the year using Mondays as the start of the week.
datepart("ww",{table.date},crMonday)
You will probably want to incorporate the year, too. You can ensure proper sorting by year and week with this
totext(datepart("yyyy",{Orders.Order Date}),"####") + " "
+ totext(datepart("ww",{Orders.Order Date},crMonday),"##")
回答2:
You could group by {table.date} - 1
.
标签:
crystal-reports