How to avoid parameter prompt in Crystal Report

Posted by Nkkppp under C# on 1/18/2013 | Points: 10 | Views : 7772 | Status : [Member] | Replies : 2
Hi,

How to avoid Optional parameter prompt.I tried different methods.In my SP i have given default value as null for all the Parameters.

InvoiceReport objReport = new InvoiceReport();
ReportDocument obj1 = new ReportDocument();
obj1.Load(@"C:\Projects\Restaurant.UI\InvoiceDetails.rpt");

if (rbInvoiceStatus.Checked == true)
{
int statusid=Convert.ToInt32(cmbItems.SelectedValue.ToString());
obj1.SetParameterValue("@InvoiceNo", DBNull.Value);
obj1.SetParameterValue("@VendorID", DBNull.Value);
obj1.SetParameterValue("@FromDate", DBNull.Value);
obj1.SetParameterValue("@Todate", DBNull.Value);
obj1.SetParameterValue("@InvoiceStatusID", statusid);
}
objReport.crystalReportViewer1.ReportSource = obj1;
objReport.Show();




Responses

Posted by: Kundnani.Rt on: 2/12/2013 [Member] Starter | Points: 25
Posted by: Kundnani.Rt on: 2/12/2013 [Member] Starter | Points: 25

Login to post response