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!

passing parameters from subreports to sql queries

Status
Not open for further replies.

wreiche

IS-IT--Management
Sep 28, 2006
36
CA
I have a report which does several queries based on a single date parameter supplied by the user. I would like to be able to have the user enter the date in the main report and then have the date passed to the sub reports (via edit / sub report links) This part works okay. I would also like to use the date parameter within queries in the sub report (database expert / add command - I'm using an Oracle 9.2 database). I have created the appropriate queries and have created parameters having the same name and types as those used within the subreport. However, when I run the report, the parameter value in the sub report is not linked to the query. (It's somewhat linked - the parameter in the query is not prompted for) The value from the parameter in the subreport is not used - the default for the parameter in the query is used instead.

How do I link a parameter from the subreport to a parameter in a query?

Werner


 
I noticed in your other post that you are using {?pm-?parameter} for your subreport parameter. Instead, try creating the parameter within the subreport to exactly match the parameter in the main report, e.g., {?parameter}. Then when you link, use the dropdown in the lower left of the linking screen to select {?parameter} instead of {?pm-?parameter}. Create the same {?parameter} in your command, instead of using {?pm-?parameter}.

Not sure this will address the issue, but it might be worth a try.

-LB
 
I have it working now. I started a new report from scratch and everything works as it should. Passing parameters in crystal seems to have a lot of glitches it it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top