Crystal Reports Passing Parameters

Crystal Reports

Passing parameters in Visual Studio 2005 with CR10

After adding a report to your project, you will be able to make a new instance of it.

NewReport nr = new NewReport();

You can either pass the value directly to the parameter or create ParameterDiscreteValue variable(s).

nr.SetParameterValue("@param1", integerValue)

OR


ParameterDiscreteValue crVal = new ParameterDiscreteValue();
crVal.Value = integerValue;
nr.SetParameterValue("@param1", crVal);