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

adding a coloumn dynamically


neha_dhingra

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

It's a little like adding JTextField on a JFrame in swing.

 

The simpliest is to look at the example in "Demo" directory of JasperReport.

See "demosamplesnoxmldesignNoXmlDesignApp.java"

 

Examine the method :

"private static JasperDesign getJasperDesign"

 

especialy see some code like :

 

Code:

field = new JRDesignField();
field.setName("FirstName"«»);
field.setValueClass(java.lang.String.class);
jasperDesign.addField(field);

 

When you see the whole code, you understand that you have to get the section as desingsection, then construct a field as designfield and after add your field to the desing section.

 

It takes time but it worth it

 

regards

Link to comment
Share on other sites

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