How to send multiple parameter value in crystal report in c#

how can i send multiple parameter value for crystal report using C# But not display records on Page

protected void FillOrderByDrivers(DateTime FromDate, DateTime ToDate, int ShowDriver, int SigDate)
            DateTime DriverFrom = Convert.ToDateTime(txtDriverFrom.Text);
            DateTime DriverTo = Convert.ToDateTime(txtDriverTo.Text);
            int DriverSegnification = int.Parse(ddlDriverSignificantDate.SelectedValue.ToString());
            int Driver = int.Parse(ddlDrivers.SelectedValue.ToString());

            int CompanyId = int.Parse(ddlComapny.SelectedValue.ToString());

            if(reportDocument == null)
                reportDocument = new ReportDocument();

            reportDocument.SetDatabaseLogon(myLogOnInfo.ConnectionInfo.UserID, myLogOnInfo.ConnectionInfo.Password, myLogOnInfo.ConnectionInfo.ServerName, myLogOnInfo.ConnectionInfo.DatabaseName);

            reportDocument.SetParameterValue("@DateFrom", DriverFrom);
            reportDocument.SetParameterValue("@DateTo", DriverTo);
            reportDocument.SetParameterValue("@CompanyID", CompanyId);
            reportDocument.SetParameterValue("@ShowDriversUsing", DriverSegnification);
            reportDocument.SetParameterValue("@SigDate", Driver);

            rptClients.Visible = true;
            rptClients.ReportSource = reportDocument;


Any suggestion will welcome Where i am wrong . Thanks

i have show the link of stackoverflow but

Passing parameter in crystal report using C#.NET

How to pass the parameter in Crystal report?

How to textbox value as a parameter in crystal report?

How to pass textbox values as parameter in crystal report in C#? I want example which shows steps to passparamter I have tried many examples but no output.. I want as in below link http://csha

passing parameter to crystal report asks for parameter value

I have a crystal report in which I am trying to pass label’s text to crystal report. But whenever I try to do it asks or parameter value. I have another form in which done same thing but it works fine

Parameter to Crystal Report

i created a @Month as parameter name in crystal report and just insert to the report header section. When i run the report always it asks the parameter by showing one box. How i pass through code. My

Crystal report static parameter and multiple values

I have a report that takes multiple values. parameter {?names} with [Allow multiple values] = True The problem is report gets an error if I try to include over 5000 names.. : :The%20request%20could

Crystal Report and C# – Changing the Text Object Color depends on Value

I’m totally new in C# and crystal report, it is possible to change the font color of text object in Crystal Report depends on value that have been shown?. example, if the value was 6PM-6AM the text

ASP.NET c# Pass Parameter Value to Crystal Report

hi i am new to crystal reports and ASP.NET I have a crystal report and all i want is to pass one parameter to that report via my page here is the code that i m using protected void setParamet

How to pass any text value from form to Crystal Report?

How to pass any text value from form to Crystal Report ? ex: i need to pass hellow from Form1 to my Crystal Report , how to do it ? (working in C#) thank’s in advance

Passing Multiple Parameter in crystal reports from VB.Net

How to pass multiple parameters in crystal report from VB.Net i want to pass 3 parameters (i have created the same in crystal report design view) parameter names are: vBranchCode, vFromDate and vToDat

Include null values in crystal parameter with multiple values

I am working on a crystal report and there is a parameter for multiple values of Field F1. There are some null values in F1 and when i select all values from the parameter prompt on loading the report


Hope u need to use following code for passing values to stored procedure, and your code is for passing values to crystal reports parameter. Try using the following code.

In Button Click use the following !

SqlConnection con = new SqlConnection();
SqlCommand cmd = new SqlCommand();
SqlParameter para = new SqlParameter();

ReportDocument report = new ReportDocument();
ConnectionInfo conInfo = new ConnectionInfo();

cmd = new SqlCommand("spGetResultdriver", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new SqlParameter("@DateFrom", SqlDbType.DATATYPE, LENGTH, "From"));
cmd.Parameters.Add(new SqlParameter("@DateTo", SqlDbType.DATATYPE, LENGTH, "To"));
cmd.Parameters.Add(new SqlParameter("@CompanyID", SqlDbType.DATATYPE, LENGTH, "Location"));
cmd.Parameters.Add(new SqlParameter("@ShowDriversUsing", SqlDbType.DATATYPE, LENGTH, "Location"));
cmd.Parameters.Add(new SqlParameter("@SigDate", SqlDbType.DATATYPE, LENGTH, "Location"));

cmd.Parameters[0].Value = dtpFrom.Text;
cmd.Parameters[1].Value = dtpTo.Text;
cmd.Parameters[2].Value = cbCityCode.Text;
cmd.Parameters[3].Value = dtpTo.Text;
cmd.Parameters[4].Value = cbCityCode.Text;

conInfo.DatabaseName = "db name";
conInfo.UserID = "user id";
conInfo.Password = "password";
int i = cmd.ExecuteNonQuery();

report.Load("report path");
SetDBLogonForReport(conInfo, report);
crvReports.ReportSource = report;

Use the following code for Login Informations

private void SetDBLogonForReport(ConnectionInfo conInfo, ReportDocument report)
        Tables tables = report.Database.Tables;
        foreach (CrystalDecisions.CrystalReports.Engine.Table table in tables)
            TableLogOnInfo tableLogonInfo = table.LogOnInfo;
            tableLogonInfo.ConnectionInfo = conInfo;

Try this !!