Skip to Content
0
Former Member
Sep 13, 2011 at 08:05 PM

Using Date Range parameter in Subreport Selection Formula

29 Views

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