I am using Visual Studio 2012 Ultimate , MySql Database , MySQL ODBC 5.1 Driver
I have created a user DSN from Administrative tool in Control Panel (same on both my development PC and Server computer i-e Windows Server 2008)
I have deployed web application from my PC to Server using IIS 7.0 and when i access it from remote computer through,then crystal report asks for login parameters and don't accept crdentials.
i am using the following code.

    string databaseName = "hr";
    string serverName = "192.168.137.6";
    string userID = "userID";
    string pass = "password";
protected void btn_search_Click(object sender, EventArgs e)
    {
        CrystalReportViewer1.Visible = true;
         ReportDocument reportDocument = new ReportDocument();
        string reportPath = Server.MapPath(@"~/GeneralEmpReports/test.rpt");
        reportDocument.Load(reportPath);

        reportDocument.SetDatabaseLogon(userID, pass, serverName, databaseName);
        reportDocument.SetParameterValue("D", tbx_ddoCode.Text.ToUpper());
        CrystalReportViewer1.ReportSource = reportDocument;
    }

After alot searching i came to the solution,
Server Name = You DSN Name not IP Address

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.