I am trying to use this in my selection criteria
but when i run the report for monthly the values were not correct
Is this the correct formula to use
Year ({Command.AuditStampEntered}) = 2010 and
(
if {?Time Period} = 'Weekly' then ({Command.AuditStampEntered} = WeekToDateFromSun)
else if {?Time Period} = 'Monthly' then ({Command.AuditStampEntered} = MonthToDate)
else if {?Time Period} = '6Months' then ({Command.AuditStampEntered} >= dateadd("m",-6,currentdate)
and {Command.AuditStampEntered} <= currentdate)
else if {?Time Period} = 'Yearly' then ({Command.AuditStampEntered} = YearToDate)
)
Please help me out
Thanks,
reacha
but when i run the report for monthly the values were not correct
Is this the correct formula to use
Year ({Command.AuditStampEntered}) = 2010 and
(
if {?Time Period} = 'Weekly' then ({Command.AuditStampEntered} = WeekToDateFromSun)
else if {?Time Period} = 'Monthly' then ({Command.AuditStampEntered} = MonthToDate)
else if {?Time Period} = '6Months' then ({Command.AuditStampEntered} >= dateadd("m",-6,currentdate)
and {Command.AuditStampEntered} <= currentdate)
else if {?Time Period} = 'Yearly' then ({Command.AuditStampEntered} = YearToDate)
)
Please help me out
Thanks,
reacha