我的Crystal报告出了什么问题?运行时,表示缺少参数值,
CrystalDecisions.CrystalReports.Engine.ReportDocument reportDocument = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
paramField.Name = "@ID";
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = patient_ID;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
paramField = new ParameterField();
paramField.Name = "@Med";
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = Request.QueryString["param1"];
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
paramField = new ParameterField();
paramField.Name = "@Year";
paramDiscreteValue = new ParameterDiscreteValue();
paramDiscreteValue.Value = Request.QueryString["param2"];
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
最后,
reportDocument.Load(Server.MapPath("CrystalReport1.rpt"));
CrystalReportViewer1.ReportSource = reportDocument;
CrystalReportViewer1.ParameterFieldInfo = paramFields;
我在这里缺少什么?