• Post Reply Bookmark Topic Watch Topic
  • New Topic

Create and print reports - best solution  RSS feed

 
Michal Malik
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
I have this problem - I have information about 50 companies and for each I have to print one-page bill every month. Bill is same for every company except name, address and value.
I want write application where I put names + cost to database (or xml) and then every month with one click print all 50 bills. But I don't have any experience with generating and printing reports
What is best solution? My idea is to have formatted template and then simply put in informations of every company. Is there any in JDK? I first think I generate pdf and print, but I dont want open Acrobat reader and print there. No, I want only button "Print bills", on click show (windows) Print dialog and then print all formatted bills.
Thanks for every help


P.S.: Sorry for my bad english
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most widely used reporting solution for Java is called JasperReports. It can create numerous output formats, including HTML and PDF. Printing a PDF can be automated using a library such as PDF-Renderer, so that shouldn't stop you from using it as an intermediate format.

You could also use a PDF-generating library such as iText to create the reports via an API.

The OtherOpenSourceProjectsFaq has links regarding all those libraries.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!