Jump to content
Changes to the Jaspersoft community edition download ×

Customizing Detail field for every data entry


TSft

Recommended Posts

Hello. I'm trying to make static method on Java, that will make a paper copy of JTable using JasperReports. Until we talking just about table data - everything is fine, I'm generating design with something kind of

 

Code:
for( int i = 0; i < model.getColumnCount(); i++ ) {
textField = new JRDesignTextField();
expression = new JRDesignExpression();
expression.setText( "$F{COLUMN_" + i + "}" );
textField.setExpression( expression );
band.addElement( textField );
}

and so on, and then fill it with a bit modified JRTableModelDataSource

 

 

Things get complicated for me when I've got to copy style of every cell of a table - that mean for every cell I have to fetch it's CellRenderer and replicate it's font style, background and so on. It's have to be executed in fill-time, but style of Detail field is already defined in design-time, similar for every row...

 

Is there any real solutions? Thanks.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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