为什么将数据集中的值添加到文本框会导致我的rdlc报告崩溃 [英] why does adding a value from a dataset to a textbox crash my rdlc report

查看:85
本文介绍了为什么将数据集中的值添加到文本框会导致我的rdlc报告崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的申请表中有几份报告。大多数使用单个数据集。



最近我为数据集添加了一个新值,并希望在其中一个报告的文本框中将其显示在我的报告中单个数据集。如果我输入



" = First(Fields!getTubeIndicator.Value)"




" = First(Fields!getTubeIndicator.Value," DatasetName" ;)"


我得到标准错误:"错误  1 文本框'textbox1'的Value表达式引用了'getTubeIndicator'字段。 报表项表达式只能引用当前数据集范围内的字段,或者如果在聚合内,则指定数据集范围
。 "


但是,如果我拖动  ; getTubeIndicator从dataSource进入文本框然后 我突然在我的报告中几乎每个文本框都得到同样的错误 - 即使只包含文本


任何想法如何解决这个问题因为我还需要添加一些文本框来显示其他值吗?


在此之前添加任何文本框我没有遇到任何问题,并且没有做过与之前的工作有什么不同的事情?


解决方案

首先你的主题涉及  Visual Studio报表控件


依旧等等看到这个 


http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/0eec9516-d0c8-423e-9458-cd67944ec078/


I have several reports in my application. most using a single dataset.

recently I added a new value to the dataset and wanted to display it in my report in a text box in one of the reports with only a single dataset. If I type

"=First(Fields!getTubeIndicator.Value)"

or

"=First(Fields!getTubeIndicator.Value, "DatasetName")"

I get the standard error:" Error 1 The Value expression for the textbox 'textbox1’ refers to the field ‘getTubeIndicator’.  Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope. "

However if I drag getTubeIndicator into a textbox from the dataSource then I suddenly get the same error for almost every single textbox in my report- even one's containing only text

any ideas how to fix this because I need to add some more textboxes to display other values aswell?

I havn't had a problem adding any text boxes prior to this and havn't done anything differently than what has worked before?

解决方案

at first your thread relates to Visual Studio Report Controls

and so on you have to see this 

http://social.msdn.microsoft.com/Forums/en-US/vsreportcontrols/thread/0eec9516-d0c8-423e-9458-cd67944ec078/


这篇关于为什么将数据集中的值添加到文本框会导致我的rdlc报告崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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