1
Answer

Crystal Reports

Ravindranath M

Ravindranath M

13y
1.3k
1
I generated Crystal Report using Parameters and I am listing the Code below...I am having Database Login Prompt Problems...Can I get the Solution for Database Login Programatically.....

private void Form1_Load(object sender, EventArgs e)
 {
  crystalReportViewer1.ReportSource = ReportPath;
  CrystalDecisions.CrystalReports.Engine.ReportDocument objReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
  objReport.Load (ReportPath);
  ParameterField f1 = crystalReportViewer1.ParameterFieldInfo[0];
  ParameterDiscreteValue v1 = new ParameterDiscreteValue();
  v1.Value = Value to be passed;
  f1.CurrentValues.Add(v1);

  ParameterField f2 = crystalReportViewer1.ParameterFieldInfo[1];
  ParameterDiscreteValue v2 = new ParameterDiscreteValue();
  v2.Value = Value to be passed;
  f2.CurrentValues.Add(v2);
  }
Answers (1)
Next Recommended Forum