Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat could be causing a missing DB field on my Crystal Report at run-time?
    primarykey
    data
    text
    <p><strong>Ladies &amp; Gentlemen,</strong></p> <p>I have been, thus far, successful in programmatically pulling records from a MySQL database to create a crystal report from a single table. Using the code below, I'm trying to join two tables and display their matched records on the report:</p> <pre><code> Try Dim myConnectionString As String = "Server=" &amp; FormLogin.ComboBoxServerIP.SelectedItem &amp; ";Port=3306;Uid=parts;Password=parts;Database=accounting;" Dim dbConn As New MySqlConnection(myConnectionString) Dim dbQuery As String = "SELECT * " &amp; _ "FROM cc_master a JOIN customer b ON b.accountNumber = a.customer_accountNumber;" Dim dbAdapter As New MySqlDataAdapter(dbQuery, dbConn) Dim dbTable As New DataTable dbAdapter.Fill(dbTable) Dim report As New rptCardListAll report.SetDataSource(dbTable) CrystalReportViewer1.ReportSource = report CrystalReportViewer1.Zoom(1) Catch ex As Exception 'MsgBox(ex.Message) End Try </code></pre> <p>The problem I'm running into now is that when the report runs at run-time, all the db records are populated on the report except for the one field that I'm pulling from the CUSTOMER table. Below is a screen shot. Notice the blank CUSTOMER NAME - this shouldn't be blank because I know for a fact there's data in that field for every record.</p> <p>The query works fine when I run it directly on the DB using MySQL Workbench, so I can't figure out why the report won't pull the requested information. Any help would be appreciated, thanks.</p> <p><img src="https://i.stack.imgur.com/jBT5r.jpg" alt="Report Snapshot"></p> <p><strong>EDIT: Screenshot showing DataSet Visualizer during debug containing the missing field (nameCOMPANY)</strong></p> <p><img src="https://i.stack.imgur.com/YE2u6.jpg" alt="Report Snapshot"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload