Note that there are some explanatory texts on larger screens.

plurals
  1. POChanging One Field in MySQL Database Breaks Visual Studio Report
    primarykey
    data
    text
    <p>I have a project I'm working on that pulls data from a MySQL database, I read the data and do some calculations to be used to display charts and graphs, and finally have the information that was calcuated compiled in a PDF report generated from a ReportViewer. The report worked fine so I thought I'd test out making changes to the database.</p> <p>There is a field in one table called "name", it's type is NVAR CHAR(MAX). To accomodate this type I read the "name" and convert it to a string using:</p> <pre><code>Convert.ToString(reader[2]); //reader is the object retrieved from the SQL query </code></pre> <p>As said before, this works fine until I change the "name" field in one table. I've changed it from a numerical string such as "2323" or "1 " (notice the space, which still works) to something arbitrary like "TEST", "TEST RUN", and "TEST " (notice the space). The program doesn't complain until I make this change at which point I'm given the following error:</p> <pre><code>Warning: Warnings occurred while executing the subreport "Subreport 1".(rsWarningExecutingSubreport) Warning: An error occurred while executing the subreport "Subreport 1" Instance: 323iT4R0x0S0): Data retrieval failed for the subreport, 'Subreport 1', located at: MyCompanyReports.Reports.Measurement.rdlc. Please check the log files for more information. (rsErrorExecutingSubreport) </code></pre> <p>I've searched around with this error and noticed that the following lines being in the wrong order was and issue, I think I have them in the correct order because I've successfully create reports with this configuration:</p> <pre><code>reportViewer1.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); this.reportViewer1.RefreshReport(); </code></pre> <p>What are some things that could be going wrong that cause this issue? I'm at my wits end.</p> <p>I'll post what code I can if needed.</p> <p>Thanks</p> <p>EDIT: For clarification, the report is being rendered to a PDF file. The PDF is still generated but instead of my charts/graphs, I am given the error string. The error occurs directly after this line:</p> <pre><code>renderedBytes = this.reportViewer1.LocalReport.Render(reportype, devinfo, out mimeType, out encoding, out fileNameExtension, out streams, out warnings); </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    1. This table or related slice is empty.
    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