Ken H

Ken H

  • NA
  • 646
  • 361.9k

crystal reports the problem

Mar 22 2013 1:51 AM

hi,
   private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                ReportDocument cryRpt = new ReportDocument();
                ParameterField paramField = new ParameterField();
                ParameterFields paramFields = new ParameterFields();
                ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
                paramField.Name = "Client_ID";
                paramDiscreteValue.Value = textBox1.Text;
                paramField.CurrentValues.Add(paramDiscreteValue);
                paramFields.Add(paramField);
                crystalReportViewer1.ParameterFieldInfo = paramFields;
                cryRpt.Load(@".\\productCR.rpt");
                crystalReportViewer1.ReportSource = cryRpt;
                crystalReportViewer1.Refresh();
              
 
            }
            catch { }
        }

now,runtime prompt parameter error.


thanks.