I have formula i use for selecting what type of grouping on time to user it´s like:
if {?time_grouping} = "Hour" Then
cstr({TABLE.TIME},"yyyy-MM-dd HH:00")
else if {?time_grouping} = "Day" then
cstr({TABLE.TIME},"yyyy-MM-dd")
else if {?time_grouping} = "Week" then
totext(datepart("ww",{TABLE.TIME},crMonday),"00")
else
cstr({TABLE.TIME},"yyyy-MM")
The trouble with the formula is that last year hade 52 weeks ? because now when i select to see the week 14 it prints week 15. if i select the dates for week 20 it prints out week 21.
else if {?time_grouping} = "Week" then
totext(datepart("ww",{TABLE.TIME},crMonday),"00")
Is there something i can do to make this work ? Is there any patch ? Other formula that corrects this ?
I'm using crystal reports 8.5.3.936 and i can't use any newer crystal reports version than 8.5 beacause the tool that pulls the reports dosent support newer versions.
I hope someone can give me a solution, i cant get it to work
Thanks / GaZoL
if {?time_grouping} = "Hour" Then
cstr({TABLE.TIME},"yyyy-MM-dd HH:00")
else if {?time_grouping} = "Day" then
cstr({TABLE.TIME},"yyyy-MM-dd")
else if {?time_grouping} = "Week" then
totext(datepart("ww",{TABLE.TIME},crMonday),"00")
else
cstr({TABLE.TIME},"yyyy-MM")
The trouble with the formula is that last year hade 52 weeks ? because now when i select to see the week 14 it prints week 15. if i select the dates for week 20 it prints out week 21.
else if {?time_grouping} = "Week" then
totext(datepart("ww",{TABLE.TIME},crMonday),"00")
Is there something i can do to make this work ? Is there any patch ? Other formula that corrects this ?
I'm using crystal reports 8.5.3.936 and i can't use any newer crystal reports version than 8.5 beacause the tool that pulls the reports dosent support newer versions.
I hope someone can give me a solution, i cant get it to work
Thanks / GaZoL