我有一个 Oracle 查询,我想检查数据类型为“集合”的 Ireport 输入控制参数的内容,如下面的 SQL
select devlocview.floorname FROM AlarmDeviceView alrmDevView INNER JOIN devicelocationview devLocView ON devlocview.oid=alrmdevview.deviceoid
LEFT OUTER JOIN DEVICEGROUPVIEW devGrpView ON devlocview.oid=devgrpview.deviceoid
LEFT OUTER JOIN RackCapacityView rackCapView ON devlocview.RACKID=rackCapView.oid WHERE
(
( $P{building.name} IS NOT NULL AND devlocview.buildingname = $P{building.name} )
OR
( $P{building.name}='All Buildings' AND devlocview.buildingname IN (SELECT buildingname FROM cdmr.devicelocationview ) )
)
AND $X{IN, devlocview.floorname, floor.name}
这里“floor.name”是Ireport的multiselect(collection type) inputcontrol参数,其中包含用户在UI“devlocview.floorname”SQL查询输出中选择的值
现在我想做类似的事情
IF USER SELECTS "ALL BUILDING" IN UI i.e. IF floor.name contains "ALL BUILDING"
THEN DO SOMETHING
ELSE
THEN DO SOMETHING
我面临的问题是我无法遍历并检查类型为“collection”的 Ireport 输入控制参数“floor.name”的内容