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

Crystal Report asks parameters for Sub Report

Status
Not open for further replies.

mynameant

Programmer
Oct 19, 2005
64
US
Hi all, I am using CR 10 and Oracle 9i Database and trying to create a report based on a stored procedure. Main report and sub reprot uses same procedure and this procedure has 2 parameters.
Sub report parameter uses same values as main report parameters.
so in sub report link panel, i have selected sub report parameters in "Sub report parameter field to use" window and unchecked "select data in sub report based field" as i do not need to filter out data in sub report.

When i run this report, Crystal wants me to enter all the parameters for both main and sub reports and not taking values from main report parameters .

Did any one got same problem and got it solved?
Thanksn
 
In Crystal 9, whenever I've run into the dialog asking for the parameters for both the main and subreport, it's because the parameter are not linked correctly in the "Subreport Links" dialog.

Make sure that you have each of the fields from the main report listed in the "Fields to link to" window and that when you choose each one, it list the proper parameter in the "Subreport parameter field to use:" box. If you are not careful, instead of choosing the existing parameter in the subreport, it will create a new parameter with a name that starts with "?Pm-".

I think that maybe that is what happened as if you have chosen a parameter that is in the subreport - you cannot check or uncheck the box for "Select data in subreport based on field" as it gets greyed out.
 
To add to what bmarks has said, use the dropdown in the lower left corner of the subreport links box to choose
{?yourparm} instead of the default {?pm-?yourparm}.

-LB
 
You are right [all] . Report has created another set of parameters with {?pm-?param} apart from {?param}.

I have linked sub report to main report using main parameters on both reports, and looks like it worked this time. :)

Thanks a bunch.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top