将值从一个数据集传递到另一个数据集以筛选 Reporting Services 2008 中的行

发布于 2024-09-29 19:33:00 字数 547 浏览 0 评论 0原文

我有两个表堆叠在一页上,一个用于过滤前一年,第二个表用于当前年份,我将相同的值从数据集传递到这两个表,唯一的区别是我需要用年份过滤它使用 Tablix 属性。现在我正在使用第二个表的硬编码值(例如 2008,2009)过滤年份。我计划动态执行此操作,因此我创建了另一个数据集 (DS2) 并尝试将其放入过滤器中的 fx(Expression) 作为 =First(Fields!Year1.Value, "DataSet2")如图所示在值文本框中。但我知道

Error as : A FilterValue for the tablix ‘Tablix1’ includes an aggregate function.  
          Aggregate functions cannot be used in dataset filters or data region filters.

我尝试使用参数,但它没有返回任何表。任何帮助将不胜感激。

替代文本

I have 2 table stacked at a single page,one for filtering previous year and 2nd table for the current year and i pass in the same value from the DataSet to these two table , the only difference is that i need to filter it with the year using the Tablix Properties. Right now i am filtering the Year with the hardcoded value like 2008,2009 for 2nd table. I planned to do it dynamically, so i created another DataSet (DS2) and tried to put it in the fx(Expression) as =First(Fields!Year1.Value, "DataSet2") in the Filter in the Value Textbox just like the diagram. but i get

Error as : A FilterValue for the tablix ‘Tablix1’ includes an aggregate function.  
          Aggregate functions cannot be used in dataset filters or data region filters.

i tried to use parameters, but it doen't return any table. any help would be appreciated.

alt text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

(り薆情海 2024-10-06 19:33:00

您想计算相对于报告运行日期的年份吗?

这会更容易,因为函数值将类似于

=Year(DateAdd("Year",-1,Now())

去年的 -1,两年前的 -2 等。

Do you want to calculate the years relative to the date the report is run?

That would be easier as the function Value would then be something like

=Year(DateAdd("Year",-1,Now())

for -1 for last year, -2 for two years ago etc.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文