.rdlc报表-无法为数据集“ DataSet1”创建数据读取器 [英] .rdlc Report - Cannot create a data reader for dataset 'DataSet1'

查看:626
本文介绍了.rdlc报表-无法为数据集“ DataSet1”创建数据读取器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用报表向导在VS 2012下创建了.rdlc-Report,并添加了数据源和数据集。
当我尝试使用下面的代码呈现报告时,出现以下错误消息:

I have created a .rdlc-Report under VS 2012 using the report wizard and added data source and dataset. When I try to render the report using the code below I get following error message:


无法为以下项目创建数据读取器数据集'DataSet1'。

"Cannot create a data reader for dataset 'DataSet1'."



bytes = localReport.Render("PDF", sdeviceinfo, out smimetype, out sencoding, out sfilenameextension, out streamids, out myWarnings);

在此先感谢您提供任何建议!

Thanks in advance for any suggestions!

推荐答案

我遇到了同样的问题,即无法为数据集'zzz'创建数据读取器

I have same problem that "Cannot create a data reader for dataset 'zzz'"

答案是ReportDataSource(string xxx ,DataTable yyy)

The answer is ReportDataSource(string xxx, DataTable yyy)

您应该使用正确的名称。 xxx应该是zzz

You should use the right name. xxx should be zzz

这篇关于.rdlc报表-无法为数据集“ DataSet1”创建数据读取器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆