2

我的 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"))

谢谢!

4

1 回答 1

2

您需要执行某种聚合。很多时候FIRSTMAX对此有用。

=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"))

资源:http: //msdn.microsoft.com/en-us/library/ms345237.aspx

于 2012-06-21T21:07:45.983 回答