VS 2008 报告
我正在使用 Visual Studio 2008 和 C#。 我想在我的柱形图上显示查询结果。 我的查询是:
select (select count(cinsiyeti)
from Hastalar where cinsiyeti = 'E') AS ERKEK ,
(select count(cinsiyeti) from Hastalar where cinsiyeti = 'K') AS KADIN
我获取值和数据集名称。 值: =Fields!Erkek.Value 和 =Fields!Kadin.Value
但编译器给出错误:
图表“cCinsiyeteGoreHastaSayisi”的标签表达式引用了字段“Erkek”。 报表项表达式只能引用当前数据集范围内的字段,或者如果在聚合内,则引用指定数据集范围内的字段。 C:\Users\cagin_arslan\Documents\Visual Studio 2008\Projects\RaporCalisamalari\RaporCalisamalari\rptCinsiyeteGoreHastaSayisi.rdlc RaporCalisamalari
I'm using visual studio 2008 with c#. i want to show that result of query on my column chart.
My query is:
select (select count(cinsiyeti)
from Hastalar where cinsiyeti = 'E') AS ERKEK ,
(select count(cinsiyeti) from Hastalar where cinsiyeti = 'K') AS KADIN
I get values and dataset name. values: =Fields!Erkek.Value and =Fields!Kadin.Value
but the compiler give that error:
The Label expression for the chart ‘cCinsiyeteGoreHastaSayisi’ refers to the field ‘Erkek’. Report item expressions can only refer to fields within the current data set scope or, if inside an aggregate, the specified data set scope. C:\Users\cagin_arslan\Documents\Visual Studio 2008\Projects\RaporCalisamalari\RaporCalisamalari\rptCinsiyeteGoreHastaSayisi.rdlc RaporCalisamalari
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只要你的变量名在数据集中的数据表中匹配并且与 sql 语句的返回值匹配就应该没问题。 正如yielvs所说,这可能是一个案例问题。
As long as your variable names match in the datatable in your dataset and with the returns of your sql statement it should be fine. Like yieldvs said it may be a case issue.