Narayana

Narayana

  • NA
  • 94
  • 15.4k

Please send Crystal Report with Parameters .

Sep 9 2016 10:37 AM
ReportDocument ClientReport = new ReportDocument();
ClientReport.Load(Server.MapPath("CrystalReport.rpt"));
CrystalDecisions.Shared.ParameterValues pval1 = new ParameterValues();
ParameterDiscreteValue pdisval1 = new ParameterDiscreteValue();
pdisval1.Value = "CLIENT_NAME";
pval1.Add(pdisval1);
ClientReport.DataDefinition.ParameterFields["@Parm1"].ApplyCurrentValues(pval1);
ClientReport.SetDataSource(ds);
// ClientReport.SetParameterValue("CLIENT_NAME", txtClient.Text.ToString());
CrystalReportViewer1.ReportSource = ClientReport;
CrystalReportViewer1.DataBind();
 
 
Error Msg: invalid index 

Answers (1)