Jump to content
We've recently updated our Privacy Statement, available here ×

NG

Members
  • Posts

    1
  • Joined

  • Last visited

NG's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. I am trying to read a parameter value and getting error The server has encountered an error. Please excuse the inconvenience. Here's the parameters I have <parameter name="totalEmployees" class="java.lang.Number" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{REPORT_PARAMETERS_MAP}.get("employees").size()]]></defaultValueExpression> </parameter> <parameter name="a" class="java.util.List" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{totalEmployees} > 1000 ?$P{REPORT_PARAMETERS_MAP}.get("employees").subList(0,1000):$P{REPORT_PARAMETERS_MAP}.get("employees")]]></defaultValueExpression> </parameter> <parameter name="b" class="java.util.List" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{totalEmployees} > 2000 ?$P{REPORT_PARAMETERS_MAP}.get("employees").subList(1000,2000):$P{REPORT_PARAMETERS_MAP}.get("employees").subList(0,1000)]]></defaultValueExpression> </parameter> I am trying to read the totalEmployees value and based on that I am trying to decide whether to use paramter a or b in the in statememnt: Here's the where clause. (1=1 and 2=2 are just to show that there are other conditions) WHERE 1=1 and CASE WHEN $p{totalEmployees}<1000 THEN $X{IN, name,a} ELSE $X{IN, name, b} END AND 2=2 Is there any syntax problem?
×
×
  • Create New...