I have just started RDLC reports but this is freaking me out.
I have a business layer class where a method returns a list of objects. I first created a report template (.rdlc file) and I mentioned that particular method. I got the fields in the object and I dragged them to the values portion in the report designer.
Next, I created a webform, and then I put a scriptManager and reportViewer in the webform. I chose my rdlc template and bound it to my reportviewer. The dataset was automatically bound using an ObjectDataSource. I did not have to bind the dataset.
<rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt">
<LocalReport ReportPath="Report3.rdlc">
<DataSources>
<rsweb:ReportDataSource Name="DataSet1" DataSourceId="ObjectDataSource1"></rsweb:ReportDataSource>
</DataSources>
</LocalReport>
</rsweb:ReportViewer>
<asp:ObjectDataSource runat="server" SelectMethod="getAllFaculties" TypeName="ERM.BLL.AcademicSetup.FacultyBL" ID="ObjectDataSource1"></asp:ObjectDataSource>
When I run this application, I get his error
An error has occurred during report processing. Cannot create a data reader for dataset 'DataSet1'.
Note: if I bind my ObjectDataSource to a GridView, it works perfectly. What am I doing wrong?