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

cdswindell

Members
  • Posts

    1
  • Joined

  • Last visited

cdswindell'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. Hi. I'm hitting a bit of a road block using JasperReports v4.5 as an embedded pdf generator in a query builder tool we developed. The tool lets users create complex, multi-criteria queries where they can retrieve fields of their own choosing. Accordingly, we are generating the JasperReports report object programmatically in Java and then using JasperReports to fill and generate the PDF. All is working fairly well, except when users select a lot of fields, including one or more that contain "long" text strings. In these cases, JasperReports throws an ArrayIndexOutOfBoundsException, with the trace shown below. Looking at the source code for ParagraphUtil.getFIrstTabStop (line 208), it is easy to see what’s going on; the empty array returned from paragraph.getTabStops isn’t being checked for a zero length, and thus the exception. Why an empty array is being returned is another issue… Another point to mention is this only appears to happen with "small" font sizes (< 6 pt). The real fix we'd like to implement is to do proper width pagination, which we do have on our roadmap. What I’d like to do in the near term is to try and figure out at run time how to identify queries that are likely to fail with this condition, and ask the user to modify their query to return fewer fields. I could always trap for this exception, but I’d like to see if there was a way I could construct the JasperReport so it didn’t fail (even if it was hard to read). Thanks, Dave Code: Post Edited by cdswindell at 02/14/2012 22:53
×
×
  • Create New...