Search code examples
jasper-reportsjasperserver

Is there a maximum length for Jasper parameter lists?


One of our reports is frequently run with a selection that includes some 14,000 drivers.

The schema for the parameter (in the parent report) looks like this:

<parameter name="DriverIds" class="java.util.List">
    <parameterDescription><![CDATA[]]></parameterDescription>
</parameter>

The where clause for the select (within a subreport) looks like this:

and $X{IN, cast(e.login_id as char(12)), DriverIds}

Only 9,628 of the 14,000 selected drivers make it to the actual query from the subreport, according to the Tomcat logs. That number is both consistent and oddly specific. (If a designed constraint, I feel like it would be something more round like 10,000)

If I analyze the actual POST to jasperserver, all 14,000 drivers make it there. If I write the query by hand, I can select for all 14,000 drivers. The problem appears to be within jasperserver itself.

Does jasper have some length constraint on $X{IN? Could the underlying db client have some issue? (Signs point to no on the latter - it seems Postgres' cap in that sense doesn't kick in until the 30,000s)


Solution

  • Jasper is actually doing a GET under the hood. As such, it's limited by Tomcat's default maxParameterCount of 10,000. As soon as I increased that to 50,000, everything worked just peachy.