我的SSRS报告中的文本框中有一个Switch语句,但我有三个数据集,需要指定在交换机中使用哪个数据集。有办法吗?如果是这样我将如何去做呢?
这是我的Switch声明:
=Switch(Fields!ProjectStatus.Value =100000000,"Active", Fields!ProjectStatus.Value = 100000001,"On Hold", Fields!ProjectStatus.Value = 100000002,"Completed", Fields!ProjectStatus.Value = 100000003, "Cancelled", Fields!ProjectStatus.Value = 100000004, "Researching", Fields!ProjectStatus.Value = 100000005, "Wish List", Fields!ProjectStatus.Value = 100000006, "Queued", Fields!ProjectStatus.Value = 100000007, "Redined"))
谢谢!
答案 0 :(得分:2)
您需要执行某种聚合。通常FIRST
或MAX
对此有用。
=Switch(First(Fields!ProjectStatus.Value, "Dataset1") =100000000,"Active", First(Fields!ProjectStatus.Value, "Dataset2") = 100000001,"On Hold", First(Fields!ProjectStatus.Value, "Dataset3") = 100000002,"Completed", First(Fields!ProjectStatus.Value, "Dataset1") = 100000003, "Cancelled", First(Fields!ProjectStatus.Value, "Dataset2") = 100000004, "Researching", First(Fields!ProjectStatus.Value, "Dataset3") = 100000005, "Wish List", First(Fields!ProjectStatus.Value, "Dataset1") = 100000006, "Queued", First(Fields!ProjectStatus.Value, "Dataset2") = 100000007, "Redined"))