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!

Main report is not passing the parameter to the subreport

Status
Not open for further replies.

maas

Programmer
Sep 3, 2009
148
BH
Hi all,

Can you please help me in passing a parameter from the main report to the subreport. I got an error saying that Cannot find parameter field Report_Number in subreport ABCD.rpt.

I have created a formula in the main report called {@report_number} which it has a value from the database {engine.rptno} which its type is number.

In the subreport, I created a parameter called {?Report_Number}, its type is number and the value of it is static. When I ran the report in the builder, the report will prompt for the {?Report_Number} and I will be able to enter the value and the report will show the data.

However, When I link the formula {@report_number} with the parameter {?Report_Number} using the "Change Subreport Link" and I unchecked the Select data based on the subreport field, I will get the error: Cannot find parameter field Report_Number in subreport ABCD.rpt.
Even I tried to change the subreport link with the parameter {Pm-ReportNumber} and to select the data from the subreport which is {engine.rptno}, the error will be generated again for the parameter {Pm-ReportNumber}.

Also, I tried to delete the subreport and to remove the links, but all the attempts are not successful.

So can you please help me in solving the issue.
 
If the data type of the formula in the main report matches the parameter in the sub-report the left side drop down on the change sub-reports links will have the sub-report parameter as a selection usually towards the bottom of the choices. Use that parameter selection not the one prefixed with the 'PM'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top