File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Dynamic columns in jasper reports Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Dynamic columns in jasper reports" Watch "Dynamic columns in jasper reports" New topic

Dynamic columns in jasper reports

uma birithi

Joined: Nov 15, 2004
Posts: 1
While creating new reports i follow the below steps:
1. create jrxml file using ireport.
2. compile the file to produce .jasper file by passing required parameters.
3. display the report in desired format html. pdf, etc.

So basically i have the report template/design in jrxml file. Depending on the requirement/parameters i populate the values.

Now i want an advanced report. where the report column needs to get build dynamically and the value for those columns will also be queried dynamically.

For example:
A report that displays the number of products available in each branchs.
So the branchs can vary over time.

Product chennai Bangalore pune ......... Total
abc 1 5 4 10
vnn 3 1 1 5
Total 4 6 5 15

Inorder to do it we need to build the report dynamically.
Any one can provide me with some solutions.

Some solution which i read from forums are
1. generate the xml dynamically and produce a .jasper file.
2. generate jasperreports using API

Can you provide me with some simple examnples.

Awaiting for immediate response. As i need to a immediate solution.
Maruthi Chokkanathan

Joined: Dec 06, 2005
Posts: 10
Check this link

You can get an idea.

Hugo Balmaceda

Joined: Jul 02, 2008
Posts: 2
[Product announcement removed. Please be sure to make product announcements in the Advertising Forum]
[ July 02, 2008: Message edited by: Bear Bibeault ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

"mamana Dj", please check your private messages for an important administrative matter.

Also, please read this with regard to resurrecting old posts.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Dynamic columns in jasper reports
It's not a secret anymore!