Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9217807
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:42:56+00:00 2026-06-18T02:42:56+00:00

how can i send multiple parameter value for crystal report using asp.net C# But

  • 0

how can i send multiple parameter value for crystal report using asp.net 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.Load(Server.MapPath("~/Report/OrdersByDrivers.rpt"));
            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);


            //reportDocument.SetDataSource(ds.Tables[0]);
            rptClients.Visible = true;
            rptClients.ReportSource = reportDocument;
            rptClients.DataBind();
            rptClients.RefreshReport();

        }

Any suggestion will welcome Where i am wrong . Thanks

i have show the link of stackoverflow but

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:42:58+00:00Added an answer on June 18, 2026 at 2:42 am

    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();
    
    con.Open();
    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();
    con.Close();
    
    report.Load("report path");
    SetDBLogonForReport(conInfo, report);
    crvReports.ReportSource = report;
    crvReports.Refresh();
    

    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;
                table.ApplyLogOnInfo(tableLogonInfo);
            }
        }
    

    Try this !!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can send requests to friends using Multi Friend Request Selector inside my Page
how i can send sms from asp.net?any idea about it?or any resource through which
I am trying to send the same parameter name with multiple values, but even
Using cURL I can send a GET request with a body. Example: curl -i
is there a way to send multiple parameters to controller as one parameter? for
I am using the following code to send an email with attachments. I can
How can i pass multiple query in a @query parameter in sp_send_dbmail ? For
How can I send multiple http requests sequentially to a server ? I want
I'm building a page with multiple forms. But they were all sent with 1
I know that soap can send XML over http, is there any way to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.