Current environment: Report Net 1.1 Oracle 10
Issue: I am creating a scheduled report that needs to calculate Fiscal YTD totals (10/1/year – 9/31/year+1) based upon the current date – the date the report is running.
I have been trying to set up a filter using the following logic without success, any suggestions?
If current month < 10 then
[date] between (year of current date – 1), month 10, day 1 and year of current date, month 9, day 30
else
[date] between (year of current date ), month 10, day 1 and end date of current year
end if
I tried the following code thinking that I could replace the hard coded dates later, but the conditional statement will not work
IF (extract(month,current_date) <10 ) THEN
(
[ Date]
between _make_timestamp(2005,10,1) and _make_timestamp(2006,9,30)
)
ELSE
(
[ Date]
between _make_timestamp(2006,10,1) and _make_timestamp(20006,12,31)
)
Error Message: QE-DEF-0259 There was a parsing error before or near position: 124, text starting at position: 54 "C Pickup Package].[Picked Up Date Dimension].[Picked Up Date] between".
BTW if I replace “(extract(month,current_date) <10 )†with “(10=10)†then the filter will execute and return values…
Any Advice? – I am going home for the day, back tomorrow (Friday) early – thanks.