phpCollab Community
Discuss everything phpCollab!

The forums are currently in READ-ONLY mode while we upgrade the forums.
Home » Development » Modifications » MOD: Export Report to PDF
MOD: Export Report to PDF [message #1527] Tue, 01 April 2003 07:18 Go to next message
abilstein is currently offline  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. Wink This MOD uses the R&OS PDF class, which I modified just a bit to make the paths consistent with PHPC.
Re: MOD: Export Report to PDF [message #1532] Tue, 01 April 2003 20:31 Go to previous messageGo to next message
titus is currently offline  titus
Messages: 1
Registered: February 2003
phpCollab guest
Wow! Great work!
But I had to comment out line 197 in exportreport.php:
//$query .= ")";
I was getting an SQL-error.
I only have unfinished tasks (0%) in my test environment, so, maybe, there are some new complications.
MOD: Export Report to PDF [message #1533] Tue, 01 April 2003 21:15 Go to previous messageGo to next message
abilstein is currently offline  abilstein
Messages: 5
Registered: January 2003
phpCollab guest

Thanks for the feedback!

Fixed - change the following lines in exportreport.php:

find:
if ($S_SDATE == "" && $S_EDATE = "") {
	$S_DUEDATE = "ALL";
}
if ($S_SDATE2 == "" && $S_EDATE2 = "") {
	$S_COMPLETEDATE = "ALL";
}


replace with:
if ($S_SDATE == "" && $S_EDATE == "") {
	$S_DUEDATE = "ALL";
}
if ($S_SDATE2 == "" && $S_EDATE2 == "") {
	$S_COMPLETEDATE = "ALL";
}


This was a bug in the original resultsreport.php that cream fixed. It caused an error when generating a report using "All" for the parameters. You can comment line 197 back in after this fix. The zip file is updated.

Thanks for spotting that! Let me know if there are any other errors.
MOD: Export Report to PDF [message #1755] Fri, 18 April 2003 21:56 Go to previous messageGo to next message
LunaC is currently offline  LunaC
Messages: 3
Registered: January 2003
phpCollab guest

Ja'Yeah! Very Happy
MOD: Export Report to PDF [message #2660] Wed, 23 July 2003 01:18 Go to previous messageGo to next message
angelphp is currently offline  angelphp
Messages: 63
Registered: July 2003
Location: spain / Asturias
phpCollab lover
sorry, very bad english.
google tranlator workin for me.;->>

I have made a small modification to your mod exportreport so that she has supported multiple languages. These are the chains that are due to add to the language file that each one wants.

http://www.elhambriento.com/scripts/exportreport_multilang.zip
MOD: Export Report to PDF [message #2836] Wed, 13 August 2003 08:37 Go to previous messageGo to next message
xlate is currently offline  xlate
Messages: 3
Registered: July 2003
Location: Norway
phpCollab guest
angelphp

sorry, very bad english.
google tranlator workin for me.;->>

I have made a small modification to your mod exportreport so that she has supported multiple languages. These are the chains that are due to add to the language file that each one wants.

http://www.elhambriento.com/scripts/exportreport_multilang.zip


The site never works Sad ...anyone else have this ZIP?
This is a great MOD, if it works as sad.
MOD: Export Report to PDF [message #2837] Wed, 13 August 2003 15:22 Go to previous messageGo to next message
angelphp is currently offline  angelphp
Messages: 63
Registered: July 2003
Location: spain / Asturias
phpCollab lover
Sorry, problems in the hosting lost file.
Today it will send again the file.
http://www.elhambriento.com/scripts/exportreport_multilang.zip
MOD: Export Report to PDF [message #4658] Thu, 25 March 2004 16:14 Go to previous messageGo to next message
funkyferdy is currently offline  funkyferdy
Messages: 2
Registered: February 2003
phpCollab guest
Hello

Really Great Mod man!! I love it and it works really fine!

I have a little Question. Is it possible to let generate the Reports in a new window?
MOD: Export Report to PDF [message #4666] Thu, 25 March 2004 23:24 Go to previous messageGo to next message
angelphp is currently offline  angelphp
Messages: 63
Registered: July 2003
Location: spain / Asturias
phpCollab lover
it is possible, will work in it.
MOD: Export Report to PDF [message #4670] Fri, 26 March 2004 08:11 Go to previous message
funkyferdy is currently offline  funkyferdy
Messages: 2
Registered: February 2003
phpCollab guest
Cewl Very Happy
Previous Topic: LDAP auth modifications
Next Topic: [MOD] Protect project from non-team members.
Goto Forum:
  


Current Time: Sat May 18 14:51:18 CEST 2013

Total time taken to generate the page: 0.34089 seconds