Java 如何在pentaho报表设计器中检查多值参数是空还是空?

Java 如何在pentaho报表设计器中检查多值参数是空还是空?,java,pentaho,Java,Pentaho,我的参数定义: <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_CLA

我的参数定义:

        <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>

及
或(ISNA([param:Destination Type]);等于([BC_FCT_CALLS.BC_NUMBER_CLASSIFICATION_DIM_CLASSIFICATION];[param:Destination Type]))
及
或者(COUNTA([param:Direction])==0;等于([BC_FCT_CALLS.BC_CALL_CLASSIFICATION_DIM_Direction_NAME];[param:Direction]))

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

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

 =(COUNTA([param1]) = 0 )
现在在您的查询中

OR( EQUALS(TRUE();[param:param1_hidden);EQUALS([TABLE.COLUMN];[param:param1,]))