Jump to content
Changes to the Jaspersoft community edition download ×

COLUMN_1,.... IndexOutOfBoundsException


2005 IR Help

Recommended Posts

By: deklotz - yourspeedracer

COLUMN_1,.... IndexOutOfBoundsException

2004-08-19 12:21

Hello,

 

I am attempting to write a servlet that creates a PDF. My current problem is related to JRTableModelDataSource() trying to retrieve more rows than there are available.

 

I am using an AbstractTableModel wrapped in the above class.

 

Within the jasper report I have defined three fields with the names "COLUMN_1", "COLUMN_2", etc...

 

Now I can see from the output of Tomcat, that the code is working (which took a long time to figure out :) ) but it is attempting to read beyond the column count.

 

I verified that my subClass of AbstractTableModel does in fact return the right number of columns for the method getColumnCount().

 

How do I tell jasper to limit the number of columns to 3?

 

 

 

 

 

 

By: deklotz - yourspeedracer

RE: COLUMN_1,.... IndexOutOfBoundsException

2004-08-19 12:24

My second sentence is wrong, it should read:

 

My current problem is related to JRTableModelDataSource() trying to retrieve more COLUMNS than there are available.

 

 

 

 

 

 

 

By: Richard Barnett - richard_barnett

RE: COLUMN_1,.... IndexOutOfBoundsException

2004-08-19 16:32

If your TableModel only supports 3 columns then you need to use COLUMN_0, COLUMN_1, COLUMN_2 in the report. Check out the source of JRTableModelDataSource.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...