views:

2829

answers:

3

I have a Crystal Report, that is populated with a stored procedure, it also contains a sub report, that I am trying to populate with another stored procedure ... same parameters. I cannot figure out how to pass the parameter value to the sub report.

Any help would be appreciated!

+1  A: 

When you add the stored proc to the sub-report CR will add the parameters automatically. Then when you set up the sub-report links you link the main report parameters to the sub-report parameters.

DJ
Thank you! I noticed that I want to link to the actual Parameter Fields in the drop down ... never noticed those there before.
mattruma
A: 

Sounds all so simple, but unfortuanate it isn't that simple. I can link the parameters from main to sub -report, no problem. But when it comes to feeding it to the subreport procedure parameters it becomes rather difficult.

I'm using Crystal XI. Same procedure main and subreport. The aim is to let the user select the parameters only once. Currently, the user needs to select the parameters for both main and sub report.

Ok, I over-read the comment where to find the dropdown. The drop down is in the screen subreport links. On the botton there are 2 dropdowns, use the one on the left.

A: 

You can pass value to sub report like this:

oRpt.SetParameterValue("@InvNo", Session("InvoiceNo"), "rptInvoicePrintSub") ' parameter for subreport
Bhavish