Using: Crystal reports 8.5, ODBC, ORACLE.
I have 2 formulas that i select between with a parameter and it works fine.
I want to be able to create another parameter called "Week" and when i choose "Week" i want the grouping to be done for each week. (Formula 2 is not the problem to do it on, i guess (week({TABLE.TIME}) will work.
I want the week to start on mondag (day2 in crystal) not on sunday. (I´m from europe)
Can anyone help me to modify this formulas to be able to groupe on week as well ?
Formula 1 ----
if {?time_group_parameter} = "Hour" Then
cstr({TABLE.TIME},"yyyy-MM-dd HH:00")
else if {?time_group_parameter} = "Day" then
cstr({TABLE.TIME},"yyyy-MM-dd")
else
cstr({TABLE.TIME},"yyyy-MM")
------------------------------------------
Formula 2 ----
if ucase({?time_group_parameter}) = 'Day' then
totext(day({TABLE.TIME}))
else if ucase({?time_group_parameter}) = 'Month' then
totext(month({TABLE.TIME}))
else if ucase({?time_group_parameter}) = 'Hour' then
totext(Hour({TABLE.TIME}),0)&":00"
-----------------------------------------------
Regards / GaZoL
I have 2 formulas that i select between with a parameter and it works fine.
I want to be able to create another parameter called "Week" and when i choose "Week" i want the grouping to be done for each week. (Formula 2 is not the problem to do it on, i guess (week({TABLE.TIME}) will work.
I want the week to start on mondag (day2 in crystal) not on sunday. (I´m from europe)
Can anyone help me to modify this formulas to be able to groupe on week as well ?
Formula 1 ----
if {?time_group_parameter} = "Hour" Then
cstr({TABLE.TIME},"yyyy-MM-dd HH:00")
else if {?time_group_parameter} = "Day" then
cstr({TABLE.TIME},"yyyy-MM-dd")
else
cstr({TABLE.TIME},"yyyy-MM")
------------------------------------------
Formula 2 ----
if ucase({?time_group_parameter}) = 'Day' then
totext(day({TABLE.TIME}))
else if ucase({?time_group_parameter}) = 'Month' then
totext(month({TABLE.TIME}))
else if ucase({?time_group_parameter}) = 'Hour' then
totext(Hour({TABLE.TIME}),0)&":00"
-----------------------------------------------
Regards / GaZoL