PDA

View Full Version : writing a report writer



Anonymous
07-04-2002, 11:58 PM
Hello =)
I read in a previous thread that creating a JFreeReport object in code is possible even without XML, but this would make it less flexible and more difficult.
I hardly know anything about XML and I am now attempting to write a report writer using the JFreeReport classes, wherein my end user would get to customize his/her reports.
Do you think that not using XML for a template is recommendable?
Is it possible to preview the report before printing without XML?


Also, does anyone have any sample code using JFreeReport he/she is willing to share?

Thanks =)

Just me, Chalk

Anonymous
07-05-2002, 07:21 AM
Hi,

>I read in a previous thread that creating a JFreeReport object in
>code is possible even without XML, but this would make it less
>flexible and more difficult.

Ah, this is not correct. Using XML is less flexible as compositing the report manually, as XML has no internal logic to influence the report creating process. But XML is easier to edit and to change, you don't have to compile the code after a change.

When your users customize the report in an way where optional elements are added/removed or where you have to change many elements of the report, I would suggest you use the manual method to create the report.

How a report is created does not influence the capabilities of the preview frame. You can use the PreviewFrame with any valid report, regardless how it was created.

For exampless of Reports created with XML and manually have a look at the latest sources in the cvs. There are samples for both cases.

Have more fun,
said Thomas

Anonymous
07-09-2002, 02:38 AM
Thanks a lot. The examples were really helpful. =)