简体   繁体   English

来自数据集的SSRS文本框表达式过滤器

[英]SSRS Textbox expression filter from Dataset

Trying to create a TextBox expression: 尝试创建TextBox表达式:

="Validity: " & IIF(Fields!ID.Value = 2, Fields!Value.Value, "") & " from date above."

from a dataset: 来自数据集:

ID; NAME;                VALUE;
1;  Delivery;            x Factory;
2;  Validity;            30 days;
3;  Pricing Structure;   Subject to...;

so that the text box would read "Validity: 30 days from date above" but returns "Validity: from date above" 因此文本框将显示为“有效期:自上述日期起30天”,但返回“有效期:自上述日期起”

The problem is the report only allows me to use aggregate First, max, etc from the dataset producing an incorrect result. 问题在于报告仅允许我使用数据集中的汇总First,max等产生错误的结果。

"Validity: " & IIF(First(Fields!ID.Value, "DataSet") = 1, First(Fields!Value.Value, ), "") & " from date above."

"Validity: x Factory from date above" “有效期:x以上日期的工厂”

Your dataset is showing "30 days", do you require the text box to show this or do you require it to be "60 days"? 您的数据集显示为“ 30天”,您是否需要文本框来显示此内容,还是要求它为“ 60天”?

Meanwhile if you restrict you dataset to one row of data, ie insert a where/having clause such as : HAVING (ID = 2), then you could use the aggregate sum function in your expression: 同时,如果将数据集限制为一行数据,即插入where / having子句,例如:HAVING(ID = 2),则可以在表达式中使用合计求和函数:

="Validity: " & IIF(Sum(Fields!ID.Value, "DataSet1") = 2, Fields!Value.Value, "") & " from date above." =“有效期:”&IIF(Sum(Fields!ID.Value,“ DataSet1”)= 2,从上述日期开始,Fields!Value.Value,“”)&“。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM