水晶报表 为什么老是出现输入参数值 5
展开全部
你这样试一下:
ParameterField Field = new ParameterField();
ParameterFields fields = new ParameterFields();
ParameterDiscreteValue Value = new ParameterDiscreteValue();
ParameterValues paramValues = new ParameterValues();
Value.Value = string.Format("", dtStarTime.Value) + "至" + string.Format("", dtEndTime.Value);
paramValues.Add(Value);
Field.ParameterFieldName = "StarEndTime";
Field.CurrentValues = paramValues;
Fields.Add(Field);
crystalReportViewer1.ParameterFieldInfo = fields;
下面是我的源码
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterValues paramValues = new ParameterValues();
ParameterDiscreteValue discreteValue = new ParameterDiscreteValue();
discreteValue.Value = "333";
paramValues.Add(discreteValue);
paramField.ParameterFieldName = "cs";
paramField.CurrentValues = paramValues;
paramFields.Add(paramField);
paramField.AllowCustomValues = false;
crystalReportViewer1.ParameterFieldInfo = paramFields;
ParameterField Field = new ParameterField();
ParameterFields fields = new ParameterFields();
ParameterDiscreteValue Value = new ParameterDiscreteValue();
ParameterValues paramValues = new ParameterValues();
Value.Value = string.Format("", dtStarTime.Value) + "至" + string.Format("", dtEndTime.Value);
paramValues.Add(Value);
Field.ParameterFieldName = "StarEndTime";
Field.CurrentValues = paramValues;
Fields.Add(Field);
crystalReportViewer1.ParameterFieldInfo = fields;
下面是我的源码
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterValues paramValues = new ParameterValues();
ParameterDiscreteValue discreteValue = new ParameterDiscreteValue();
discreteValue.Value = "333";
paramValues.Add(discreteValue);
paramField.ParameterFieldName = "cs";
paramField.CurrentValues = paramValues;
paramFields.Add(paramField);
paramField.AllowCustomValues = false;
crystalReportViewer1.ParameterFieldInfo = paramFields;
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询