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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing parameters to subreports 1

Status
Not open for further replies.

endoflux

Technical User
Aug 6, 2001
227
0
0
US
I have two reports that I want to run as one...they both need the same set of parameters entered. Is there a way to pass the parameters entered from the first on to the other when attached as a subreport?
 
Hi endoflux

Usually when I add a subreport I then right click on the subreport and select Edit Subreport Links, within here you link the main report parameters to the Subreports parameters and the values will get passed directly from the main report through to the Subreport.

To do the linking :
select the main report parameters in "Available Fields " and add them to "Field(s) to Link to".
Click on each field in turn in "Field(s) to Link to " and select its equivalent under "Parameter Fields " in the "Sudreport parameter Field to use" drop down.
 
Thanks! This worked flawlessly...

Just to clarify a bit for newbies looking at this, when you initially insert your subreport and choose the report file, there is a tab for "Links". The fields in the left window are main report fields, which you can add to the window at the right to pass them to the subreport. Make sure you define what subreport field each field is related to in the box below the right window!!
 
When I pass multiple values to a subreport, it doesn't work quite right...

My report gives hours per billing category, with totals for a given date range and tech name. The subreport gives the hours per billing category by account, limited by the tech name; only their accounts will show up.

When I added the subreport, I deleted all the record selection material, and used the tech name and daterange parameter fields from my main report to select the appropriate records in the sub report.

In order to run the report for more than one tech and get more than one cross tab (so I get a report for each tech selected, not one huge one), I put both the crosstab from the main report, and the subreport in a group header.

To get to my problem, the main report has no trouble splitting things out and giving me a new table for each tech...but the subreport is just making one table summarizing all the customer info for all the selected techs, and repeating it in each group.

How can I get the subreport to only report the particular tech that the main report is reporting in that group?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top