Jump to content

Dynamic data at runtime


upanshuvaid

Recommended Posts

Hi 

The fields are not decided at report template creation time 
 below is the requirment that is to be acomplished

1- if report has 2 fields than it should print like 

field1 field2

2-if report has 3 fields than it should print like 

field1 field2 field3

3- if n number of fields than it should print like 

field1 field2 field3  field4             fieldn

that to in horizontal direction.

Thanks

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

A JasperReport is based on a fixed set of fields returned by a query. If the query can return variable columns, say:

  • make the column names abstract in the query - field1, field2
  • define the fields in the report to be the maximum number expected
  • if the query does not provide a particular column, the corresponding field in the report will be null
  • include logic in the report to manage field with content or null

Sherman

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