Jump to content
Changes to the Jaspersoft community edition download ×

CustomTableModel and the columnNames

Recommended Posts

By: Benjamin Lim - benlim

CustomTableModel and the columnNames

2002-09-29 19:45

Hi, wonder if anybody can help me with the following.

I have a CustomTableModel that has the following column names "No Of Years" and "Total Cost". Meaning to say the column names is made up of more than one word. Can you give me pointers on how I can modify the sample source and XML so that I can fill Jasper Report with data from a Swing table?


Thanks alot!



By: Teodor Danciu - teodord

RE: CustomTableModel and the columnNames

2002-10-01 03:04




In order to supply TableModel data to a report,

you can use the dori.jasper.engine.data.JRTableModelDataSource.


It is true that you cannot name your report fields

using names with more that one word in them.

Still, you can use field names such as COLUMN_5

in order to retrieve data found on the column with

index 5 in your table model object.

This is a feature of this implementation of the

JRDataSource interface.


I hope this helps.


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