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!

Passing a criteria to multuple subreports

Status
Not open for further replies.

stotzc001

Technical User
Mar 27, 2003
30
US
I have a main report that is a running summary of operations at my work. In that main report there are three subreports that us the value [Report Date] as the query criteria. So if I want to create a report for "2/3/2002" I can get the Main Report to work fine, however, access asks me three more times for the report date for each subreport. Is there a way to pass the parameter to each subreport without having to reenter it each time?
 
Each subreport will have a Parent - Child link in the Property page.. this needs to be set to ReportDate so that each report element will use the same value
 
Trendsetter is correct. Once the parent/child link is set to ReportDate, you can take the [reportdate] criteria out of the queries for the sub reports. That will eliminate the additional requests.

Alternately, you could set the criteria for the subreport queries to reference the [ReportDate] field of the main query.
 
I'm having the same problem with only one subreport. My main report prompts for a beginning date and an ending date, then I get a prompt for the link field that defines my relationship between the report and subreport.

I have my the following properties set for my subreport.
Link Child Field - RETREAT_ID
Link Master Field - RETREAT_DETAILS.ID
 
I would assume that the start and end dates are being requested by your main report query and this is as designed in the query but the link fields shown don't appear to be the same thing.
I would think from the naming used that RETREAT_ID is the key field for the Parent and RETREAT_DETAILS.ID is the key field for the Child.
The Child should also hold the RETREAT_ID field as the related field and this is what the Parent - Child relationship is built on.

Frank J Hill
FHS Services Ltd.
frank@fhsservices.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top