Link to home
Start Free TrialLog in
Avatar of IncognitoMan
IncognitoManFlag for Bulgaria

asked on

Crystal Reports Passing Subreport Parameters

OK guys, I have a report, and a subreport in it. The report has got some paramters, and the subreport has got paramters with the same name. I have written the following function to add parameters to the report, but I don't know how to pass parameters to the subreport. Help me.
private ParameterField addParameter(string name, string value)
        {
            ParameterField parField = new ParameterField();
            ParameterDiscreteValue parametedValue = new ParameterDiscreteValue();

            parField.Name = name;
            parametedValue.Value = value;
            parField.CurrentValues.Add(parametedValue);
            return parField;
        }

//And then I call the function like this
parFields.Add(addParameter("NameOfParameter", "value"));
//After Adding all the parameters I Do this
crystalReportViewer.ParameterFieldInfo = parFields;
//And all works fine, now help me about the part with the subreport parramteres pls

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial