I'm using CR10. Currently, I have this in my R/S:
(
{DAY_RPT_DTE} >= {?SelectedDate}
and
{DAY_RPT_DTE} <= {?EndSelectedDate}
)
or
{DAY_RPT_DTE} >= dateserial(year({?SelectedDate})-1,month({?SelectedDate}),day({?SelectedDate})) and
{DAY_RPT_DTE} <= dateserial(year({?EndSelectedDate})-1,month({?EndSelectedDate}),day({?EndSelectedDate}))
I'm trying to show based on the parameters, sales for the dates entered and for the same period last year. I.E. if 1/1/08 to 3/15/08 is entered then the results for that time and 1/1/07 to 3/15/07 will also display.
Mostly the problem is with the previous year's totals. Here is my formula for that:
//@Prior year sales
if {DAY_RPT_DTE} >= dateserial(year({?SelectedDate})-1,month({?SelectedDate}),day({?SelectedDate})) and
{DAY_RPT_DTE} <= dateserial(year({?EndSelectedDate})-1,month({?EndSelectedDate}),day({?EndSelectedDate})) then
{PROD_PAP_AMT}/1000
Thanks for any help.
(
{DAY_RPT_DTE} >= {?SelectedDate}
and
{DAY_RPT_DTE} <= {?EndSelectedDate}
)
or
{DAY_RPT_DTE} >= dateserial(year({?SelectedDate})-1,month({?SelectedDate}),day({?SelectedDate})) and
{DAY_RPT_DTE} <= dateserial(year({?EndSelectedDate})-1,month({?EndSelectedDate}),day({?EndSelectedDate}))
I'm trying to show based on the parameters, sales for the dates entered and for the same period last year. I.E. if 1/1/08 to 3/15/08 is entered then the results for that time and 1/1/07 to 3/15/07 will also display.
Mostly the problem is with the previous year's totals. Here is my formula for that:
//@Prior year sales
if {DAY_RPT_DTE} >= dateserial(year({?SelectedDate})-1,month({?SelectedDate}),day({?SelectedDate})) and
{DAY_RPT_DTE} <= dateserial(year({?EndSelectedDate})-1,month({?EndSelectedDate}),day({?EndSelectedDate})) then
{PROD_PAP_AMT}/1000
Thanks for any help.