aspose file tools*
The moose likes XML and Related Technologies and the fly likes Best way to create reports with FOP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Best way to create reports with FOP" Watch "Best way to create reports with FOP" New topic
Author

Best way to create reports with FOP

Paul Duer
Ranch Hand

Joined: Oct 10, 2002
Posts: 98
Hello all,
I have been searching for a tool to allow me to use Apache FOP to create PDF reports on the fly from a website.
Basically what I can't find is a good report creation tool. I have seen some examples of XSL sheets that create some nice reports. But I want something would create reports with the precision of Oracle Reports or Crystal Reports on a page, but could use the FOP XSL:FO interface.
Any ideas?
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
FOP can do what you want.
In can be integrated with servlets to create dynamic reports like in vb-crystal report.
Read the documentation and examples that comes with fop package.
The power of your reports depends on how well you can write XSLT.
Read fop docs.


Spritle Software Blogs
Paul Duer
Ranch Hand

Joined: Oct 10, 2002
Posts: 98
Thanks for the response! I guess what I don't have is a good knowledge of XSLT too! It's like yeah I can layout columns and rows, and I know some font tags and stuff. But what about all the page layout and the breaking and all that?
Is FOP really suited to be a full scale report engine? Can it be expected to do complex pagination and headers and footers through XSLT alone?
OR is Oracle, Cyrstal, Business Objects still needed?
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
XSL-FO is not sufficient as a reporting engine. XSL-FO is perfect for rendering reports, though. The "reporting engine" is something you need to write, namely a combination of Java/SQL/XSL which produces the expected XML document conforming to the XSL-FO schema.
I wouldn't be surprised if Crystal Reports or the Oracle counterpart would actually use XSL-FO themselves to render their PDFs...


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Sean Sullivan
Ranch Hand

Joined: Sep 09, 2001
Posts: 427
Open source: http://jasperreports.sourceforge.net/index.html
Sean Sullivan
Ranch Hand

Joined: Sep 09, 2001
Posts: 427
BTW, my company produces PDF documents using the iText library.
We have simple requirements and iText works quite well.
http://www.lowagie.com/iText/
iText is open source.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
I agree with Lasse..
Currenct apache fop release includes pagination, footer, index etc., You can also check the w3-xsl:fo complaince chart of apache fop in their site. Download fop package and check the examples, it has everything to start.
Shabbir Rahman
Greenhorn

Joined: Feb 18, 2002
Posts: 18
FOP is a nice tool for reporting, I used it in my two vb project and one java project. As XSL is a rich programming language if data structure of XML is correct then I think every type of report can be generated by XSL-FO, SVG (Excel like, Graph ..). One problem FOP has, it doesn�t yet has support for all XSL-FO element. Instead of FOP I also used Antenna Formatter (not open source), good but less restrictive which causes portability problem.


-----------------<br />IBM XML Developer <br />SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Best way to create reports with FOP
 
Similar Threads
FOP vs RTF
Pattern Suggestion: Vendor providing challenging problem
looking for tool to convert xml to pdf
Transform XML to RTF
PDF and java