title: Crystal Report using C# and MySQL. Working on design but always failed to login at run time
body: <p>So first of all.
  I am using Windows 8.1 64 bit, Visual Studio 2013 32 bit, and MySQL (installed using xampp) and the latest version of Crystal Report(as of date, which is CRforVS_13_0_10, which is compatible to VS2013)
  also mysql-odbc-connector-32bit, I tried using 64 but my database wont show(for more additional info)</p>
  
  <p>Here how it goes.</p>
  
  <p>I am able to connect on my database using ODBC(32bit, cause i cant see it using 64bit driver)</p>
  
  <p>It works perfectly on design and I can also preview the live data using the preview button.</p>
  
  <p>Now, the problem occurs during run time.
  when I run my application, and call the report to set the parameter and refresh it, "Database Login" will prompt, and wont accept any credentials.</p>
  
  <p>Here is my code: (which i saw from someone else)</p>
  
  <pre><code>crOfficialList.SetParameterValue("listNumber", listInformation[1]);
  crystalReportViewer1.ReportSource = crOfficialList;
  
  crystalReportViewer1.Refresh(); 
  </code></pre>
  
  <p>and i ended up having unlimited "database login" prompt.</p>
  
  <hr>
  
  <p>I also tried setting up the ConnectionInfo using the following code:</p>
  
  <pre><code>            ReportDocument rdOfficialList = new ReportDocument();
              TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
              TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
              ConnectionInfo crConnectionInfo = new ConnectionInfo();
              Tables CrTables;
  
              rdOfficialList.Load(Application.StartupPath + "/Reports/crOfficialReceipt.rpt");
  
              crConnectionInfo.ServerName = "localhost";
              //also tried using the name i set on DSN which is localServer, but it didnt work, It will only prompt unlimited "database login".
  
              crConnectionInfo.DatabaseName = "myDB";
              crConnectionInfo.UserID = "root";
              crConnectionInfo.Password = "";
  
              CrTables = rdOfficialList.Database.Tables;
              foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
              {
                  crtableLogoninfo = CrTable.LogOnInfo;
                  crtableLogoninfo.ConnectionInfo = crConnectionInfo;
                  CrTable.ApplyLogOnInfo(crtableLogoninfo);
              }
  
              ParameterFieldDefinitions crParameterFieldDefinitions;
              ParameterFieldDefinition crParameterFieldDefinition;
              ParameterValues crParameterValues = new ParameterValues();
              ParameterDiscreteValue crParameterDiscreteValue = new ParameterDiscreteValue();
  
              crParameterDiscreteValue.Value = listInformation[1];
              crParameterFieldDefinitions = rdOfficialList.DataDefinition.ParameterFields;
              crParameterFieldDefinition = crParameterFieldDefinitions["officialReceiptNumber"];
              crParameterValues = crParameterFieldDefinition.CurrentValues;
  
              crParameterValues.Clear();
              crParameterValues.Add(crParameterDiscreteValue);
  
              crParameterFieldDefinition.ApplyCurrentValues(crParameterValues);
              crystalReportViewer1.ReportSource = rdOfficialList;
              crystalReportViewer1.Refresh(); 
  </code></pre>
  
  <hr>
  
  <p>In this case, I am getting an error message "Failed to open the connection".
  What do you think guys? Thank you.:)</p>