2

So I have a table with employee name, job and shift. Each employee (Row) has a unique name, a non unique job and one of 4 shifts (A, B, ,C or D). I want to create a Data Item called "Shift A Employees" that that for each job it spits out one string that contains all the employees who work that ob on that shift for example:

I have this

And want to be able to have this

How would I go about writing my expression definition for my "Shift A Employees" data item?

4

1 回答 1

3

创建一个执行此操作的数据项可能相当复杂。为什么不将中继器表拖到您的列表中?您需要向查询中添加两个数据项。一个是running-count(1 for [Job])(我想。我现在没有我的例子。)另一个将该值与工作的最大值进行比较。如果值匹配,则不返回任何内容,如果不匹配,则返回逗号。这是模式:

case
when [rownum] < [maxrownum] then ','
else ''
end

命名它comma。然后,您只需将 [Name] 和 [comma] 拖到中继器表中。使中继器表高 1 行,列宽比您认为需要的多。您需要为转发器表定义主从关系。

于 2018-06-22T23:47:13.537 回答