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

Duplicating Parameters

Status
Not open for further replies.

spelhank

Technical User
Sep 12, 2003
14
US
I am using Crystal 8.5. I have created a report that has four subreports. Each subreport asks for the same parameters. Is there a way to pass the parameters selected in the first subreport to the other three subreports so the user doesn't have to type in the same parameters 4 times?

I have tried using shared variables in the record selection formula, but get an error message that the selection of the data has to be done prior to the running of the shared variable. Any other suggestions would be greatly appreciated.

 
Create your parameters in the main report. Link the parameters in the main report to the parameters in each subreport. You should only be prompted for the parameter values once, when you initially run the report.
 
Thanks IDO for your prompt response to my question. However, I do not have the field to query in the main report. The field I am querying only lies in the subreport. Without the field in the main report, I can't choose it to create the parameter.

I am trying to link data that really doesn't exist in the same tables. Probably a better solution would be to create a new table to pull the unrelated data together, but I am working with a proprietary database that does not allow me to do that.
 
Then one solution might be to make one of the subreports the main report, and create the current main report as a subreport. Then you can link the other three subreports to the main report on the parameter fields (since it sounds like all subreports share the parameter field).

-LB
 
You don't need the field in the main report; you just need to create the parameter in the main report...

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Ido is right, it's common for people to make parameters in subreports when they're not required.

Create the parameter, and when using the Linking for the subreport, select the FIELD in the subreport that the parameter is linked to.

The parameters don't have to be used bu the main report, and parameters aren't linked at the time of creation, they're used after the fact or they won't even elicit a prompt.

-k
 
Oops. Please ignore my suggestion. Ido and SV are right.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top