| MOD: Export Report to PDF [message #1527] |
Tue, 01 April 2003 07:18  |
abilstein
Messages: 5 Registered: January 2003
|
phpCollab guest |

|
|
We needed the ability to generate paper reports out of PHP Collab, so I whipped this up:
http://www.austinsystems.com/scripts/exportreport.zip
This is an easy mod (only adds 2 lines to core PHPC file) and will create a PDF Report of tasks generated from the database. It will print your company name and the Report name at the top of the page, and a footer with your company name, URL, and phone number on every page. Each task is printed in a separate table with task name, start-due-close date, hours worked, percent complete, status, assigned to, description, and comments. This mod is for version 2.4 only. Any other versions may have a different structure and may not work out of the box, although you should be able to take these files and set it up yourself.
How it functions:
This mod will create an "Export" icon in the "My Reports" list of the User home page. Clicking the icon will generate the PDF.
*******************************
1) Included in the zip file is a new PHPCollab folder, FTP the new folder over your existing installation. These are all new files so nothing will be overwritten if you are using a clean install. Included are the PDF classes and fonts, and /reports/exportreport.php. Note: if you already have my Export Users MOD, you only need to upload the exportreport.php file into /reports and modify home.php as described below.
2) Open /general/home.php
------
Find:
$block4->paletteIcon(2,"info",$strings["view"]);
After this add:
$block4->paletteIcon(3,"export",$strings["export"]);
------
Find:
$block4->paletteScript(2,"info","../reports/resultsreport.php?","false,true,true",$strings["view"]);
After this add:
$block4->paletteScript(3,"export","../reports/exportreport.php?","false,true,true",$strings["export"]);
*********************************
That's it, you're done! I would appreciate any feedback if it doesn't worked for you. I checked the zip file this time and made sure I had the correct file in there. This MOD uses the R&OS PDF class, which I modified just a bit to make the paths consistent with PHPC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|