Crystal Report ---"ParameterField.Add" throw NotSupportedexception

Worrow

Regular
Joined
Jul 10, 2003
Messages
68
Here is the code:

ReportDocument rptShippingList;
rptShippingList = new ReportDocument();
rptShippingList.Load(Application.StartupPath+ "\\FullCartonPickingInstructionList.rpt");
ParameterDiscreteValue y = new ParameterDiscreteValue();
y.Value = "Transfer";
ParameterValues x = new ParameterValues();
x.Add(y);
ParameterField param = new ParameterField();
param.Name = "Transfer";
param.CurrentValues = x;
rptShippingList.ParameterFields.Add(param); <---Problem:confused:

Everything is fine until the last line. I got a NotSupportedexception which I have not idea what the problem is :( I have already search the web but no one seems to have such problem! Anyone know what's going on here?

Thanks in advance!
 
Back
Top