This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Create and print reports - best solution

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic