Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

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: 43027
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