I am new to crystal report.I have designed the crystal report by following this link Crystal Report with SQL Stored Procedure Parameter and Visual Studio Actually i need to pass different ID(Input value of the SP) to the SP that i connected with the Crystal report.
This is the Code that i am Passing the ID to crystal report :
protected void Button1_Click(object sender, EventArgs e)
{
string QuotationID = ViewState["QUOTATION_ID"].ToString();
ReportDocument reportDocument = new ReportDocument();
ParameterField paramField = new ParameterField();
ParameterFields paramFields = new ParameterFields();
ParameterDiscreteValue paramDiscreteValue = new ParameterDiscreteValue();
paramField.Name = "@id";
paramDiscreteValue.Value = QuotationID;
paramField.CurrentValues.Add(paramDiscreteValue);
paramFields.Add(paramField);
paramFields.Add(paramField);
CrystalReportViewer1.ParameterFieldInfo = paramFields;
string reportPath = Server.MapPath("~/CrystalReport.rpt");
reportDocument.Load(reportPath);
CrystalReportViewer1.ReportSource = reportDocument;
}
But when ever i click the button it asking the ID ...