Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In order to use a standard .Net DataSet as an DataSource for a Reporting Services Report I had to:</p> <ol> <li><p>Create an ADO DataSet which uses the same stored procedure as the DAL method</p></li> <li><p>Use the ADO DataSet to populate the fields in the Report in the designer</p></li> <li><p>In the aspx page, use the following:</p> <pre class="lang-html prettyprint-override"><code>&lt;rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="655px" Width="980px"&gt; &lt;ServerReport ReportServerUrl="" /&gt; &lt;LocalReport&gt; &lt;/LocalReport&gt; &lt;/rsweb:ReportViewer&gt; </code></pre> <p>And in the code-behind:</p> <pre><code>ReportViewer1.ProcessingMode = ProcessingMode.Local Dim report As LocalReport = ReportViewer1.LocalReport report.ReportPath = "&lt;your report path&gt;" report.DataSources.Clear() Dim rds As New ReportDataSource() rds.Name = "&lt;dataset name&gt;_&lt;stored proc name&gt;" rds.Value = &lt;your DAL method ()&gt; report.DataSources.Add(rds) report.Refresh() </code></pre></li> <li><p>Once you have tested this and are comfortable with the report you get, you can safely exclude the ADO DataSet from your project.</p></li> </ol> <p>Notes: This is far from ideal and there are likely steps I did which are unnecessary or something I missed.<br> One thing that gave me a real headache was that the XML in the RDLC contained definitions for old ADO datasets that were no longer relevant. To strip those out, right click the rdlc file in your Solution Explorer and select "Open With" then XML Editor in the next menu. </p>
 

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