cancel
Showing results for 
Search instead for 
Did you mean: 

How to use PL/SQL Parameters in Main Report and Subreport?

Former Member
0 Kudos

Hi all,

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.

Thank you,

Erin

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

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.

-Dell

Former Member
0 Kudos

Hi Dell,

Sorry I'm getting back to you so late.  I have tried doing this, but the links don't always stick.  You're confirming what I thought I should do, though, so thank you and thank you for your post.

Take care,

Erin

Answers (0)