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

Pass SQL parameter to subreport

Status
Not open for further replies.

pomster

Technical User
Jan 15, 2003
88
AU
I have a report with a SQL parameter (Customer). on the report is a subreport also with a SQL parameter (Customer).
Can I pass the parameter from the main report SQl to the subreport SQL?


regards,


David

CRXIR2 with CRXIR2 server and SQL 2005
CR2008 with CR2008V1 Server and SQL 2005
 
Hi David,
Yes, you can.
Right-click on the Subreport, and select "Change Subreport Links" from the shortcut menu.
In the "Subreport Links" dialog, select the main report's Parameter from the "Available Fields" box
on the left and move it to the "Field(s) to link to" box on the right.
From the "Subreport Parameter Field to use" dropdown, scroll to find the parameter that exists in your subreport.
Don't select the one that starts "?Pm-"

Now the value entered in the main report's parameter will be passed to the subreport's parameter.


Bob Suruncle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top