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

查看:21
本文介绍了.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);

推荐答案

我有同样的问题无法为数据集 'zzz' 创建数据读取器"

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

答案是ReportDataSource(string xxx, DataTable yyy)

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

You should use the right name. xxx should be zzz

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

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