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

Passing a paramater given to a report from the parent to a subreport

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a report that has a subreport in the details section. Both reports use separate pl/sql stored procedures to get data. I need to open the report from the web. I can open the report successfully, however, I am prompted to enter the username, password, and paramater value that the subreport is to use for accessing the database. I am giving the parent report the username, password, and paramater when I open the report using the viewer. How can I get the subreport to use the same username, password, and paramater that I gave to the parent without prompting me to enter them? (When I do enter them, btw, the report runs fine.) I looked into using subreport linking, but it doesn't sound like what I need, since the data sources for the parent and subreport are two separate stored procedures.
Any help on the matter will be very appreciated.
 
I'm not sure if this will work, but did you try creating those same parameters in the subreport and then check what happens?
 
I have the same problem. I tried passing the parameters from the main report to the subreport, but when I open the webpage it still prompts me for the username and password for the subreport.
 
mmr93,

Both of the reports have the same paramater already. I'm trying to find out how to explicitly communicate the paramater from the parent to the subreport. The reason I'm trying to do this is because I'm being prompted from the browser to enter the username, password, paramater for the subreport, even though both of the reports use the same values. The information is being communicated to the parent report, obviously, because it opens. Unfortunately, the communication between parent and subreport doesn't seem to be automatic. Thanks for you input, though.

-kristi_i
 
I am not sure it will work through the web, but here is how I have gotten it to work on the desktop version:

1) In the main report, create a formula field like this:

whileprintingrecords;
shared stringvar xyz := {?whatever}

2) In the sub report, create a formula like this:

whileprintingrecords;
shared stringvar xyz

3) Use the formula in the sub report in your selection formula. Howard Hammerman,

Crystal Reports training, consulting, books, training material, software, and support. Scheduled training in 8 cities.
howard@hammerman.com
800-783-2269
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top