无法创建rdlc报告 [英] Cannot create rdlc report
问题描述
我刚刚开始RDLC报告,但这吓坏了我.
我有一个业务层类,其中方法返回对象列表.我首先创建了一个报告模板(.rdlc文件),并提到了该特定方法.我将字段放入对象中,并将其拖到报表设计器中的值部分.
接下来,我创建了一个Web表单,然后在该Web表单中放置了一个scriptManager和reportViewer.我选择了rdlc模板并将其绑定到我的reportviewer.数据集是使用ObjectDataSource自动绑定的.我不必绑定数据集.
< rsweb:ReportViewer ID =" runat =" 服务器" 字体名称 Verdana" 字体大小 =" WaitMessageFont名称 =" span> WaitMessageFont-Siz e =" >>
< LocalReport =" Report3.rdlc" < 数据源 >
< rsweb:ReportDataSource 名称 =" DataSourceId ObjectDataSource1 " < >
< /DataSources >
< /LocalReport >
< /rsweb:ReportViewer >
< asp:ObjectDataSource 运行 =" SelectMethod getAllFaculties " TypeName ERM.BLL.AcademicSetup.FacultyBL" ID =" > < /asp:ObjectDataSource >
当我运行此应用程序时,我得到了他的错误
报表处理期间发生错误.无法为数据集"DataSet1"创建数据读取器.
注意:如果我将ObjectDataSource绑定到GridView,它会完美地工作.我在做什么错?
请参阅链接以从头开始创建rdlc报告:
没有SQL Server Reporting Services的Microsoft报表 [ ^ ]
<><a href=""></a><a href=""></a>[<a href="" target="_blank">^</a>]
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?
Refer the link to create the rdlc report from scratch:
Microsoft Reporting without SQL Server Reporting Services[^]
<><a href=""></a><a href=""></a>[<a href="" target="_blank">^</a>]
这篇关于无法创建rdlc报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!