Quantcast
Channel: Crystal Reports
Viewing all articles
Browse latest Browse all 1507

Parameters are not accepting on Crystal Report

$
0
0

Hi,

I have one crystal report where i created three parameters.

1. pJobOrderID        (set its ValueField = JobOrderID of my xsd)

2. pJobOrderYear     (set its ValueField = JobOrderYear of my xsd)

3. pJobOrderType     (set its ValueField = JobOrderType of my xsd)

And here I am calling report.

string constr = ConnectionInfo.GetConnectionString();
SqlConnection aConnection = new SqlConnection(constr);
aConnection.Open();
SqlDataAdapter dataAdapter = new SqlDataAdapter("select * from jobordertestreport", aConnection);
DataSet ds = new DataSet();
dataAdapter.Fill(ds);

ReportDocument rptdoc = new ReportDocument();
rptdoc.Load(Server.MapPath("CrystalReport2.rpt"));

rptdoc.SetDataSource(ds);
rptdoc.SetParameterValue("pJobOrderID", "0002");
rptdoc.SetParameterValue("pJobOrderYear", "2014");
rptdoc.SetParameterValue("pJobOrderType", "services");
this.CrystalReportViewer1.RefreshReport();

this.CrystalReportViewer1.ReportSource = rptdoc;

When I run the report, it ask me these 3 parameters. I want to pass it from codebehind.

Please help. Thanks


Viewing all articles
Browse latest Browse all 1507

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>