Note that there are some explanatory texts on larger screens.

plurals
  1. POREPORT RDLC: I have a String parameter in a DataSet in VS 2010 C# but after executing query, nothing shows up
    primarykey
    data
    text
    <p><strong>I am making a Report using RDLC. Visual Studio 2010 Ultimate + SQL Server 2012 Express</strong></p> <blockquote> <p><strong>InvoiceID is a String.</strong> This is a query with parameter on a Dataset TableAdapter. I entered this SQL in the Query Builder part of the DataSet.</p> </blockquote> <pre><code>SELECT SequenceNo, InvoiceID, VisitID, CaseNo, WalkinID, Payment, Invoice_date, Status FROM INVOICE WHERE (InvoiceID = @InvoiceID) </code></pre> <p>When I click the Execute Query in the Query Builder, it asks for a value. I enter 20130508-650875. No quotes whatsoever. Then it produces the result I wanted.</p> <p>Now, I'm going to run the program then generate the report.</p> <p>The C# part:</p> <pre><code> INVOICETableAdapter.Fill(dataset.INVOICE, InvoiceID); MessageBox.Show(InvoiceID.ToString()); //just to confirm what value the parameter is getting </code></pre> <p>Now, nothing comes out of the table in my report. I don't know why. The table on my report now only contains the headers of the columns I dragged.</p> <p>I TRIED REMOVING THE ---WHERE--- PART OF THE QUERY AND IT PRODUCED A LOT OF RESULTS!</p> <pre><code>SELECT SequenceNo, InvoiceID, VisitID, CaseNo, WalkinID, Payment, Invoice_date, Status FROM INVOICE //WHERE (InvoiceID = @InvoiceID) </code></pre> <p>Now, I want to ask you guys what could be the reason why does the table in my report go blank when I execute the report with parameters. But if it has no parameters, it produces all results. Could it be the query? </p>
    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.
 

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