PDA

View Full Version : How To..



Anonymous
05-06-2002, 03:30 PM
Hi,

I am new to Java programming and would appreciate any help....

After reading the purchased JFreeReport documentation I still have a few questions.

I have been able to sucessfully run and compile the demo program.

I would like to use JFreeReport for the following tasks:

Read table data from a flat file
Have one column summed
And finally outputted as a pdf file.

My flat file would be very large containg ~200.000 records. So there is no need for a preview like that on the demo.

So far a have got a grasp of the xml file.
But need to know how to get the data to JFreeReport straight from the flat file.

If anybody has made an example similar to this I would very much like to see it...

Thanks,
Vik

Anonymous
05-07-2002, 02:59 PM
What is the format of your flat file? Is the data tab-delimited?

Regards,

DG.

Anonymous
05-07-2002, 03:55 PM
I will be doing a query and dumping it all into a flat file... yes tab delimited.

I can make the file any way I want to, whatever is best with JFreeReport.

Thanks,
Vik

Anonymous
06-06-2002, 08:29 AM
hello,
i ask very stupid question.but i did't understand that how to use JfrreReport. i have download JFreeReport, there is three directies.
but no example and they did't find any api or help. How to add jfreeReport to our programm.and where i can get the JFreeReport documentation .
so plz write me how can i use this report and where i can get example of JFreeReport.
thank
sandeep

Anonymous
06-06-2002, 10:20 AM
Hi sandeep

The "Get-Started" documentation can be found on SourceForge, either in the docs section for the readme file and a bigger documentation on the download page. The information there should get you up to the demonstration application. This application and the reports it uses show how to use JFreeReport and how to write and use the report definitions.

A detailed documentation can be purchased from the object-refinery webpage. The API documentation can be generated using JavaDoc.

Have more fun,
said Thomas

Anonymous
06-06-2002, 10:34 AM
Hi Vik Mehta,

such huge textfiles are evil. If you have enough ram, you could try to use the csv-jdbcdriver from "http://csvjdbc.sourceforge.net" to create the table model needed for jfreereport.

But you are doing a query? From a JDBC-Datasource or a database reachable via jdbc? If the answer is yes, just feed the resultset from your database into JFreeReport and you will get your results without writing and then reading the textfile. If you are on windows you may get your database (and even excel) jdbc compliant by using the jdbc:odbc-brige included in the JDK.

Regardless how you create your resultset, feed the ResultSet into the ResultSetTableModelFactory found in our util package, and you'll get a table model suitable for jfreereport.

By the way, there is a memoryleak in 0.7.2, which is fixed in the cvs version. You won't have much fun with 0.7.2 as it will easily fill 512MB when availiable and will still crash with an OutOfMemory error. Use the cvs version instead.

Have more fun,
said Thomas