If i may?
I've been having to do a lot of work with subreports lately...
You can pass the Start and end date from the main to your subreports
via the linking options...
But before you do that, are you using any shared variables to pass data from your subreport to your main report? If so, i do not think this will work for you. If you're not passing values from your subreport to your main, then this should work beautifully...
Go ahead and enter design view, and right mouse click on your Subreport.
Go to Change Subreport Link... Now,
you sould have a Subreport Links box. The left are fields from your main report you can move to the box on the right. Go ahead and move over the, {?StartDate} and {?EndDate} (or what you have them named as...).
Go ahead and highlight one of them (either one is fine you're going to be doing this to both of them...)
There's a ?Start field link underneath these two boxes you were using, on the left drop down should say ?Pm-?StartDate. and the right is what you're going to be linking this parameter to. In this case the timestamp.
Now do the exact same thing for the ?EndDate.
Now, From here, right mouse click on the subreport again, go to edit.
Then go to your Select Expert in your Timestamp criteria, it should now show up in a formula form. like:
{table1.timestamp} in [{?StartDate} to {?EndDate}]
{table1.timestamp} = {?Pm-StartDate}
{table1.timestamp} = {?Pm-EndDate}
What you're going to want to do, is just Cut the {?Pm-StartDate}
and replace {?StartDate} with {?Pm-StartDate} and the same thing with the EndDates.
Once you're done, your Select Expert Formula for this should look like:
{table1.timestamp} in [{?Pm-StartDate} to {?Pm-EndDate}]
Hope this helps!
If I was unclear, please let me know and i'll try to clear it up.
-Takesen