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

Adding a parameter to SQL command in sub report 1

Status
Not open for further replies.

johnhugh

Technical User
Mar 24, 2010
702
SG
Hi,

I'm using CR 2010 and am trying to pass a paramter from my main report to the SQL command in my sub report.
I added links like I always do so the subreport has the correct value.
However this value does not seem to get passed on to the SQL command.

I created a paramter in the SQL command and linked it to the paramter from the subreport.

This is in my Select Expert:
{?rcp}={?Pm-PORCPH1.RCPNUMBER}

Thats the WHERE clause of my SQL statement
WHERE (PORCPH1.RCPNUMBER = '{?rcp}')

I also tried
WHERE (PORCPH1.RCPNUMBER = '{?Pm-PORCPH1.RCPNUMBER}')


What am I doing wrong?

 
YOu need to create a parameter inside the command in the command edit dialog box.

Then add a similar Parameter to main report.

Then in SR link dialog, drag main parameter into window then in lower left hand corner scroll down until you find SR parameter and link.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top