Worrow Posted May 22, 2007 Posted May 22, 2007 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! Quote
Worrow Posted May 25, 2007 Author Posted May 25, 2007 Well, the problem is I need to set the datasource of the report before adding any parameter. :o Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.