johnstrang
Technical User
Hi Everyone,
Another question about subreport parameters - using CR 8.5 with a direct connection to an Oracle database.
I have a Parameter {?Time Period} to select the time period required - there are 3 available selections
"Last Week"
"Last Month"
"Year to Date"
I have 2 formulas to calculate the beginning and end dates of the selected time period
I want to make the dates returned by these formulas available to my subreport, so I can have Record Selection based on
{Creation_Date} >= {@first_date} and
{Creation_Date} <= {@last_date}
I have tried this, but the formulas {@first_date} and {@last_date} don't run because they don't recognise the parameter {?Time Period}
I've tried various options but for some reason I can't achieve what I need, other than by having another prompt for {?Time Period} for the subreport.
If anyone can help I'd be very grateful,
John
Another question about subreport parameters - using CR 8.5 with a direct connection to an Oracle database.
I have a Parameter {?Time Period} to select the time period required - there are 3 available selections
"Last Week"
"Last Month"
"Year to Date"
I have 2 formulas to calculate the beginning and end dates of the selected time period
Code:
{@first_date}
select {?Time Period}
case "Last Week" : DataDate + ( -(dayofweek(DataDate)) - 5)
case "Last Month" : DateSerial(Year(DataDate), Month(DataDate) -1, 1)
case "Year to Date" : DateSerial(Year(DataDate), 1, 1)
end
{@last_date}
select {?Time Period}
case "Last Week" : DataDate + ( -(dayofweek(DataDate)) + 1)
case "Last Month" : DateSerial(Year(DataDate), Month(DataDate), 1 - 1)
case "Year to Date" : DataDate
end
I want to make the dates returned by these formulas available to my subreport, so I can have Record Selection based on
{Creation_Date} >= {@first_date} and
{Creation_Date} <= {@last_date}
I have tried this, but the formulas {@first_date} and {@last_date} don't run because they don't recognise the parameter {?Time Period}
I've tried various options but for some reason I can't achieve what I need, other than by having another prompt for {?Time Period} for the subreport.
If anyone can help I'd be very grateful,
John