共享数据集返回两列:DaysEarly 和 NumberShipped。我想在表格中使用它来显示提前、准时和延迟的发货数量。数据如下所示:
DaysEarly NumberShipped
3 123
2 234
1 254
0 542 -- On time shipments
-1 43
-2 13
该表使用此数据集。我有以下表达式:
-- Early kits
=IIf(Fields!DaysEarly.Value > 0, Sum(Fields!NumberOfKits.Value),Nothing)
-- On Time Kits
=IIf(Fields!DaysEarly.Value = 0, Sum(Fields!NumberOfKits.Value), Nothing)
-- Late Kits
=IIf(Fields!DaysEarly.Value < 0, Sum(Fields!NumberOfKits.Value), Nothing)
最后一个表达式对所有出货量求和。前两个返回以下消息:
The Value expression for the textrun...contains an error:
The query returned now rows for the dataset. The expression
therefore evaluates to null.
这样做的正确方法是什么?我正在根据上面的数据寻找这样的结果:
Early shipments: 611
On time shipments: 542
Late shipments: 56