Re: Dynamic Generating reports to print

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 24/04/2005, at 12:43 AM, Steve Brown wrote:


I used to encounter the same problems with reporting in our business software. You can generate reports and spit out HTML in a new window and have the user print the report from the browser, but that has many drawbacks. It only works with simple data sets, its difficult (or impossible) to control page breaks, lack of precision placing, etc.

Now I use FPDF to generate PDF reports (http://www.fpdf.org/).  Its
free, easy to use, and pretty flexible.  It allows you to do precision
placement on a page, add headers, footers, etc, etc, etc.  Be sure to
check out the "Scripts" section, its got a bunch of useful tips for
expanding functionality of the classes.  There is another commerical
product out there (can't thin of the name right now) that is supposed
to be faster, but FPDF is pretty fast in our applications.


I find doing it this way a total pain in the ass, I have in the past used htmldoc , to generate html to pdf , it has special tags to do certain things in the pdf's. Seriously drawing it like this is time consuming. I would suggest report designers like report manager and jasper reports. Currently for Excel I have built a subclass to the PEAr structures datagrid which uses the excel spreadsheet renderer, and i give it a database resultset, currently the dataobject, and then it will generate the columns dynamically from the query. I have given it extra methods to display extra stuff in the header and footer ie for formulas , and special formatting on the cells. But pdf's are nice if the user doesnt need to collate the data just print it.

The funky thing with Jasper reports is, you can maniuplate the xml based files, say build a web frontend to build a report builder, so the user doesnt need to use gui tools like iReport to create report templates. So you let them select the fields you want, and u do the sql and xml generating in the backend. To do it currently, the fields have to be statically setup , it also however requires a Jsp to run a servlet to compile the reports. Reportman however runs a cgi report server, but cant do excel on unix.


I also use the JPGraph package for generating graphs (http://www.aditus.nu/jpgraph/). This is *really* slick. Its free for personal use, about $125 for commercial use. You need to install some additional PHP libraries (JPEG, PNG, GD at least), but its fast and easy. I love playing around with this product because the possibilities for what you can do are almost endless.



This is really sweet however it doesnt have PHP5 support ?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux