Crystal sub report stored procedure parameter

crystal-reports

I'm using Crystal reports designer Version 11.

I have a report which calls a subreport and I have set up linked parameters.
The subreport is using a stored procedure.

I can't see how I feed to the parameters passed to the sub report into the stored procedure that is returning the data.

Best Answer

This is really late to the party, but I'm researching the same problem (I think) and have found a solution. In the main report, right-clck on the sub report and "Change Subreport Links".

In the top section, choose your parameter in the main report and click the right arrow to add to the "Field(s) to link to". In the bottom, sub-report section of the window, change the left side "Subreport parameter field to use" drop-down. It defaults to creating a new parameter in the sub report and you don't want to do that. You want to use an existing paramter (that was automatically added by using the stored procedure). In the drop-down choose that parameter that was auto created by the stored procedure.

Doing this means that you can have a parameter in the main report that you can automatically pass to the subreport which means you don't have to enter the same value for two separate parameters.

I hope this helps. It works great for me.

Related Topic