How to use PL/SQL Parameters in Main Report and Subreport?
I am currently working with Crystal Reports that are written of PL/SQL stored procedures. The parameters from the stored procedure are automatically added to the report when connected and I've modified one of the reports to include a subreport that is based off the same stored procedure as the main report.
STORED PROCEDURE A
MAIN REPORT based off STORED PROCEDURE A
SUBREPORT based off STORED PROCEDURE A
No links between main and subreport.
When you first bring in the stored procedure or the set the database location, the parameters come up and I read somewhere that you're supposed to keep them all to null. I didn't do this for all but one parameter and THAT parameter, when you refresh the report shows the stored procedure parameter and the subreport stored procedure parameter in the same place (see attached file - PL'SQLStoredProce.JPG).
My question is - what is the correct way to set up the parameters in Crystal Reports (set to null?) so that when you enter parameters for the main report for it's stored proc, the subreport also gets those same parameters for it's stored proc.
Dell Stinnett-Christy replied
You'll use the Subreport Links to do this.
- Right-click on the subreport and choose "Subreport Links".
- In the top left, select the first parameter and move it to the top right.
- In the bottom left, select the corresponding parameter from the subreport.
- Continue until you have linked up all of the parameters.
- Save the links and run your report.