View Full Version : Servlet for JFreereport

08-22-2002, 10:55 PM
I'm new in java.
I want to use this JFreereport in my web. We only need to input query (to database), and then the report automatically created. Is there anyone know how I can make this thing?
I've tried to trace the source code, and I've made it to show data from database. But when I tried to print-previewed it, the data didn't show. I guess I must edit another file. Is this right?


08-23-2002, 03:36 PM

yes, every Report is made up by several bands filled with elements. When you create an empty JFreeReport object, you have to fill it with life by adding the several bands. But don't be scared, you don't have to code everything manually, just write an xml-description of your report and use the supplied parser to generate a filled JFreeReport object.

Have a look at the jfreereport-0.7.5-install.pdf, it contains an simple example of how to write such an report definition. Additionally you'll find several xml-definitions in the package com.jrefinery.report.demo.

An simple generator to create a basic report from an table model was mentioned during the last days, but there is no such generator yet available. Anyway, I added a task-request for that ...

Have more fun,
said Thomas

08-25-2002, 11:35 PM
I was planning to make this XML-PDF converter become servlet. So, users would only need to input the xml and query (to get data from database). I don't know where to start (making servlet).

I've tried to trace the source to find where the converter section, but I'm still confused.

About the xml-description, is it possible to create automatically xml-description based on the query (to database)? I mean, the field in the report table only follow the field of table in database.

Can anyone tell me where I should start with?

Thanks all,