0

我的参数定义:

        <list-parameter name="Direction" allow-multi-selection="true" strict-values="true" mandatory="false" type="[Ljava.lang.String;" query="DirectionQuery" key-column="BC_CALL_CLASSIFICATION_DIM_DIRECTION_NAME" value-column="BC_CALL_CLASSIFICATION_DIM_DIRECTION_NAME">
        <attribute namespace="http://reporting.pentaho.org/namespaces/engine/parameter-attributes/core" name="role">user</attribute>
        <attribute namespace="http://reporting.pentaho.org/namespaces/engine/parameter-attributes/core" name="parameter-render-type">list</attribute>
        <attribute namespace="http://reporting.pentaho.org/namespaces/engine/parameter-attributes/core" name="label">Direction</attribute>
        <attribute namespace="http://reporting.pentaho.org/namespaces/engine/parameter-attributes/core" name="hidden">false</attribute>

我的 MQL 查询中的约束部分

<constraint>
  <operator>AND</operator>
  <condition>OR( ISNA([param:Destination Type]);EQUALS([BC_FCT_CALLS.BC_NUMBER_CLASSIFICATION_DIM_CLASSIFICATION];[param:Destination Type]))</condition>
</constraint>
<constraint>
  <operator>AND</operator>
  <condition>OR(COUNTA([param:Direction]) == 0 ;EQUALS([BC_FCT_CALLS.BC_CALL_CLASSIFICATION_DIM_DIRECTION_NAME];[param:Direction]))</condition>
</constraint>

第一个约束有效,因为参数是单个值,但第二个约束给我一个消息 CONTA is not supported 如果用户选择多个值,则 ISNA 不起作用。

4

1 回答 1

2

我找到了一种方法,为每个多值参数“param1”在“后处理器公式”中为新参数创建另一个隐藏的布尔参数“param1_hidden”,使用以下公式

 =(COUNTA([param1]) = 0 )

现在在您的查询中

OR( EQUALS(TRUE();[param:param1_hidden);EQUALS([TABLE.COLUMN];[param:param1,]))
于 2012-10-16T09:12:47.657 回答