cancel
Showing results for 
Search instead for 
Did you mean: 

Passing stored proc parameter by subreport links

Former Member
0 Kudos

Post Author: congebec

CA Forum: Crystal Reports

Hello, First of all, my problem is the stored proc parameters aren't successfully pass by subreport links. I have a report with 2 subreports. Each reports use a stored proc with 2 parameters. And the parameters are the same for the 3 reports.So what I did is, in "change subreport links", I had the 2 parameters for each subreport and unchecked "select data in subreport based on field:"Then in "Select expert" under "Show formula", I add {?@FrstParam} = {?Pm-?@FrstParam} and{?@ScndParam} = {?Pm-?@ScndParam} and{sp_Sub1;1.d_NRI} = {?Pm-sp_Main;1.d_NRI} The report is successfully saved but the sub report are just not showing and it is not a design problem or else. The problem really is the @FrstParam and @ScndParam don't receive the parameters.I also tried programmatically "cr.SetParameterValue("fieldName","value","crSubRepor1")" and it didn't work.I've been on that problem for 1 and a half day now.Thank you for any technical support.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Post Author: congebec

CA Forum: Crystal Reports

SOLUTION: I removed all the design linking and programmatically did it. It'd suck if my email would stop here. My solution was: MainReportName.SetParameterValue("@fieldName","value","SubReportName")Hope it'll help.