rsErrorReadingDataSetField-Microsoft报表查看器 [英] rsErrorReadingDataSetField - Microsoft Report Viewer

查看:259
本文介绍了rsErrorReadingDataSetField-Microsoft报表查看器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

使用DataSet填充报表查看器时出现问题.

我有一个DataTable,它正在Microsoft Report Viewer的某些文本框中填充.

有些字段为空.

当我执行程序时,大多数字段都被填充,但是一些没有出现.

当我检查输出时,我得到了什么:


警告:数据集"DataSet2_DataTable1"包含字段"invoice_date"的定义.数据源返回的结果集中缺少此字段. (rsMissingFieldInDataSet)
警告:数据集"DataSet2_DataTable1"包含字段"invoice_date"的定义.数据扩展名在读取字段时返回错误.在位置9处没有该字段的数据.(rsErrorReadingDataSetField)
警告:数据集"DataSet2_DataTable1"包含字段"payment_location_detail"的定义.数据源返回的结果集中缺少此字段. (rsMissingFieldInDataSet)
警告:数据集"DataSet2_DataTable1"包含字段"payment_location_detail"的定义.数据扩展名在读取字段时返回错误.在位置13处没有该字段的数据.(rsErrorReadingDataSetField)
警告:数据集"DataSet2_DataTable1"包含字段"comp_address"的定义.数据源返回的结果集中缺少此字段. (rsMissingFieldInDataSet)
警告:数据集"DataSet2_DataTable1"包含字段"comp_address"的定义.数据扩展名在读取字段期间返回错误.在位置14处没有该字段的数据.(rsErrorReadingDataSetField)
警告:数据集"DataSet2_DataTable1"包含字段"company_name_generator"的定义.数据源返回的结果集中缺少此字段. (rsMissingFieldInDataSet)
警告:数据集"DataSet2_DataTable1"包含字段"company_name_generator"的定义.数据扩展名在读取字段期间返回错误.在位置15处没有该字段的数据.(rsErrorReadingDataSetField)
警告:数据集"DataSet2_DataTable1"包含字段"company_address_generator"的定义.数据源返回的结果集中缺少此字段. (rsMissingFieldInDataSet)
警告:数据集"DataSet2_DataTable1"包含字段"company_address_generator"的定义.数据扩展名在读取字段时返回错误.在位置16处没有该字段的数据.(rsErrorReadingDataSetField)
警告:"company_name_generator"文本框的值表达式包含错误:对象引用未设置为对象的实例. (rsRuntimeErrorInExpression)
线程0x176c已退出,代码为0(0x0).
线程0x44c已退出,代码为0(0x0).
线程0x1408已退出,代码为0(0x0).
线程0x450已退出,代码为0(0x0).


我检查了我的代码,它返回了这些字段.这1行中只有2列为空-(但之所以为空,是因为它们应该为空,而不是因为没有被检索).

在履历表中,所有字段均已检索,但并非所有字段都显示在我的报告中.

也许我必须更新数据集,刷新一下,我不知道...如果是,我该怎么办?有任何按钮可以做到吗?

你能帮我解决吗?

在此先感谢!

Hi all,

I am having a problem when I feed my Report Viewer using a DataSet.

I have a DataTable that is filling in some text boxes in my Microsoft Report Viewer.

Some fields are null.

When I execute the program, most of the fields are filled but some doesn''t appear.

When I check the Output this what I get:


Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘invoice_date’. This field is missing from the returned result set from the data source. (rsMissingFieldInDataSet)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘invoice_date’. The data extension returned an error during reading the field. There is no data for the field at position 9. (rsErrorReadingDataSetField)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘payment_location_detail’. This field is missing from the returned result set from the data source. (rsMissingFieldInDataSet)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘payment_location_detail’. The data extension returned an error during reading the field. There is no data for the field at position 13. (rsErrorReadingDataSetField)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘comp_address’. This field is missing from the returned result set from the data source. (rsMissingFieldInDataSet)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘comp_address’. The data extension returned an error during reading the field. There is no data for the field at position 14. (rsErrorReadingDataSetField)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘company_name_generator’. This field is missing from the returned result set from the data source. (rsMissingFieldInDataSet)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘company_name_generator’. The data extension returned an error during reading the field. There is no data for the field at position 15. (rsErrorReadingDataSetField)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘company_address_generator’. This field is missing from the returned result set from the data source. (rsMissingFieldInDataSet)
Warning: The data set ‘DataSet2_DataTable1’ contains a definition for the Field ‘company_address_generator’. The data extension returned an error during reading the field. There is no data for the field at position 16. (rsErrorReadingDataSetField)
Warning: The Value expression for the textbox ‘company_name_generator’ contains an error: Object reference not set to an instance of an object. (rsRuntimeErrorInExpression)
The thread 0x176c has exited with code 0 (0x0).
The thread 0x44c has exited with code 0 (0x0).
The thread 0x1408 has exited with code 0 (0x0).
The thread 0x450 has exited with code 0 (0x0).


I checked my code and it is returning those fields. Only 2 columns of this 1 row are null - (but they are null because they are supposed to be null, not because they are not being retrieved).

In resume, all the fields are being retrieved but not all are being displayed in my Report.

Maybe I have to update the dataset, some refresh, I don''t know... if yes, how can I do it? Is there any button to do it?

Can you help me to solve it?

Thanks in advance!

推荐答案

在select语句中,每个字段都使用coalesce()

这样,您返回类似
的东西
选择Coalesce(DateOfBirth,``N/A'')

"N/A"是有效的字符串数据类型,不为null.
in the select statement use coalesce() per field

this way you return something like

Select Coalesce(DateOfBirth, ''N/A'')

''N/A'' is a valid string datatype and not null.


这篇关于rsErrorReadingDataSetField-Microsoft报表查看器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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