on 09-13-2011 9:05 PM
I have a subreport which includes this line in the selection formula:
{Production.Date} = {?Pm-?DateRange}
{?Pm-?DateRange} appears in the Subreport Links window, so it seems like it should work.
The DateRange parameter is set by the user in the Main report.
But the subreport returns no records.
I tried this:
In the Main report I created a StartDate and a StopDate field from {?Pm-?DateRange} .
Then in the subreport selection formula I used these two formula fields like this:
{Production.Date} >= @StartDate
and
{Production.Date} <= @StopDate
This works!
So I have found a workaround, but still, I don't understand why the original code {Production.Date} = {?Pm-?DateRange} returns no records.
Thanks,
Art
Hi Art,
You cannot use a date range parameter directly in the subreport's record selection formula.
You'll need to create a formula in the Main report like this:
Minimum(?DateRange) //This gives the start date
Maximum(?DateRange) //This gives the end date
Then send these formulas as parameters to subreport for use in the record selection formula.
I think you've already got this figured out anyway!
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.