Jasper reports is a library focused on reports construction (in several formats). This is a quote from their site:
"JasperReports is a powerful open source Java reporting tool that has the ability to deliver rich content onto the screen, to the printer or into PDF, HTML, XLS, CSV and XML files."
You might also wanna take a look at iReport, which is a tool that builds over Jasper reports and makes things easier for you. Please, take a look at the following websites and let us know if you have more questions.