tags:

views:

103

answers:

3

I need to generate a report/printout programmatically.

My app currently uses FastReport to build a report, consisting of text, images, tables etc.

It does not bind to any database. Everything is built programmatically.

However, the finished report does not look the same in PDF and RTF, and the old code is generally very complicated.

Are there any better tools to programmatically make a printout or report? Preferably one that outputs PDF and DOC.

+1  A: 

You can try Rave Reports.

It has built in components to generate PDF, RTF and HTML documents.

And also it comes free.

Bharat
Rave reports is considered by many to be a dead end.
Warren P
+3  A: 

In my opinion you've already got the best! I've used QuickReports, Piparti (early ReportBuilder), Crystal(!) and ReportBuilder and I've written a few reports by sending commands direct to the printer. As far as I'm concerned FastReport is much better (although I haven't tried Rave - nor will I).

Is it a recent version of FR? The PDF output for us is fine.
They have some good examples of writing reports through code on their website I believe and if you're looking at re-writing all the reports in A.N.Other reporting product why not, instead, use the opportunity to re-write the reports in a more maintainable way using FR? (Assuming that's possible, of course). Perhaps a cleaner approach to the code of the report generation will make it easier for the FR converter to create the RTF/DOC output...

I've never had much luck generating decent RTF versions of reports from commercial report writers. The only decent output I got was through lovingly hand coding every report using hundreds of '{','}' and '\' and spending days reading the RTF specs. Never again!
A lot of it appears to be down to the order you add the text/lines/fonts/styles etc to the report and the RTF generator can find it difficult to get the best rendering - I think.

shunty
+1, PDF from FastReport looks absolutely perfect.
Cosmin Prund
PDF looks good. RTF seems to always put the pagenumbers on a blank page. That's what I'm struggling with: PDF and RTF don't look the same.
kejster
My first guess would be that page size and/or margins are not set correctly or are not being interpreted correctly - but I'd hate to think how you'd determine that. I'm not convinced that other report writers will have any easier a job at producing RTF - but I may be wrong.
shunty
That could be it. It looks like the pagenumbers gets pushed down to the next page. But if margins were set wrong, I'd assume that it'd also look that way in PDF.
kejster
Yeah, I did wonder that, but perhaps there's some extra margin calculation going on in the RTF exporter. Or even, perhaps, whatever it is you are using to display the RTF doc (eg Word etc) is reformatting it (I found this happened far too often when I used to use RTF). All guesswork, of course!
shunty
+1  A: 

For non-database printing needs, FastReport already works (code-based reporting), but for direct printing of Documents you could consider the very-thorough ExpressPrintingSystem from developer express, which is a true delphi printing system, not a reporting system.

Also if you need to create a print documents, almost like a word processor, and then print those word-processor-like documents, consider TRichView. It supports .DOC files, something you asked about.

Some day you might need a banded-report generator again and if you do, FastReport really is the best.

Warren P
The ExpressPrintingSystem is indeed a fine product (I forgot to mention that one). I found TRichView very capable but very hard work - but I think that is probably down to RTF in general. Trouble is you can't really do RTf *and* PDF with it so you'd need 2 sets of reports. Alternatively just buy a redistributable license for a PDF print driver (eg pdfFactory Pro) I guess.
shunty