Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport links for date ranges???

Status
Not open for further replies.

PQTIII

IS-IT--Management
Sep 21, 2004
110
Is it possible to use a date range as a subreport link?? In my main report I have a field that totals fuel usaged for individual trucks then it goes to a subreport linked by truck. I need it to use the same date range as the main report uses.

Thanks
pt CR.9
 
Sure, point to the parameter in the Available Fields window, and then to your date field in the subreport.

-k
 
I would create the same daterange parameter within the subreport and add it to the subreport record selection formula, just as you did in the main report:

{table.date} in {?daterange}

Then in the subreport linking screen, move the main report parameter to the right and in the bottom left corner, use the dropdown list to select {?daterange} instead of the default {?pm-?daterange} as the subreport linking field.

-LB
 
Be careful when using LBs solution, you'll find that some interfaces will then display the date range parameter twice, and if you're using code to invoke reports, it also adds an unnecessary level of complexity to passing the parms.

-k
 
I've never seen that happen, if the linking is done correctly, but then I don't have broad experience with a variety of interfaces. But SV, I couldn't get your suggestion to work, so maybe you could be specific about how you would set this up with a date range parameter. Just setting the date in the subreport to {?pm-?daterange} returned no records.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top