title: Crystal Report 13 prompts Database Login in VS 2010
body: <p>I am currently having problem displaying the Crystal Report in my VB.Net(VS2010) application. I Googled this issue, found similar problem, but their solution didn't fixed mine. </p>
  
  <p>Everytime I call the CR report from my VB application, it always prompts for a Database Login. I've entered my DB credentials but it fails. I am connecting to a MySQL5.1 via ODBC connector. </p>
  
  <p><img src="https://i.stack.imgur.com/Eh9rC.png" alt="enter image description here"></p>
  
  <p>In my Crystal Report, I have created a custom Command which accept 2 parameters from my application, e.i, dateFrom and dateTo, which I used to query between the date range. </p>
  
  <p><img src="https://i.stack.imgur.com/uasVO.png" alt="enter image description here"></p>
  
  <p>I've noticed that when I took off my code where it sets the Crystal Report parameter value, the Database Login doesn't appear.</p>
  
  <p>Here's my code snippet:</p>
  
  <pre><code>Dim appPath As String = Path.GetDirectoryName(Application.ExecutablePath)
  Dim cryRpt As New ReportDocument
  Dim CRTable As CrystalDecisions.CrystalReports.Engine.Table
  Dim CRTLI As CrystalDecisions.Shared.TableLogOnInfo
  
  cryRpt.Load(appPath &amp; "\Reports\crDtrLogs.rpt")
  
  frmReportViewer.crReportViewer.Refresh()
  For Each CRTable In cryRpt.Database.Tables
     CRTLI = CRTable.LogOnInfo
     With CRTLI.ConnectionInfo
         .ServerName = "dtrsql"
         .UserID = "root"
         .Password = "root"
         .DatabaseName = "dtrsql"
     End With
     CRTable.ApplyLogOnInfo(CRTLI)
  Next CRTable
  </code></pre>
  
  <p>When I took this out, everything works fine even without adding the table connection info</p>
  
  <pre><code>cryRpt.SetParameterValue("dtpFrom", dtpFrom.Value.Date.ToString("yyyy-MM-dd"))
  cryRpt.SetParameterValue("dtpTo", dtpTo.Value.Date.ToString("yyyy-MM-dd"))
  
  cryRpt.SetParameterValue("strDateRange", dtpFrom.Value.Date.ToString("MMMM dd, yyyy") &amp; " - " &amp; dtpTo.Value.Date.ToString("MMMM dd, yyyy"))
  
  frmReportViewer.crReportViewer.ReportSource = cryRpt
  frmReportViewer.Show()
  </code></pre>
  
  <p>As always, any help is greatly appreciated.</p>