Connecting Tech Pros Worldwide Forums | Help | Site Map

PHP Reports

ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#1: Feb 3 '09
Hi,

Anybody who can recommend a best freeware reporting tool for PHP? A user friendly or easy to develop.

thanks!

Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,664
#2: Feb 3 '09

re: PHP Reports


what do you mean by "reporting tool"?
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#3: Feb 4 '09

re: PHP Reports


Hi Dormilich,
Im looking for a web base reporting tool where the user can dowloaded or run the result of the queries.
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,664
#4: Feb 4 '09

re: PHP Reports


what queries? I still can't figure it out.
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 914
#5: Feb 4 '09

re: PHP Reports


So using queries (presume MySQL or SQL queries) to generate a document displaying figures/statistics?

You said PHP but I'm not sure what you need to report on with PHP? Please give a better explanation, aswell as an example of what you wnat it to do.
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#6: Feb 5 '09

re: PHP Reports


Yes, I'll be using MYSQL as the database and the website will be created in PHP. Im looking for a reporting tool will help me to build these reports that will be posted on a website and can be dowload by the users
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 914
#7: Feb 5 '09

re: PHP Reports


What does the report contain? Is it information stored in MySQL, server status, text from you, etc...

Most things like that you can just write on your own and you don't really need a "reporting tool".

Do you want your output in html, word doc, pdf, etc.?
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#8: Feb 6 '09

re: PHP Reports


Yes, can be download on a excel or pdf format
TheServant's Avatar
Expert
 
Join Date: Feb 2008
Location: Australia
Posts: 914
#9: Feb 8 '09

re: PHP Reports


This is my last reply. Please tell us what the report will contain. Stuff from inside a database, server information or just text? If you do not explain yourself clearly you will not get any help. We're not here to figure out what your problem is AND solve it. We're here to give advice for clearly defined specific problems you are having.
ddtpmyra's Avatar
Familiar Sight
 
Join Date: Jun 2008
Location: CA
Posts: 222
#10: Feb 9 '09

re: PHP Reports


I thought I gave enough information already... stating MYSQL is the database and output can be downloaded on pdf or excel format. And Im just asking for suggestion how to do this.
mageswar005's Avatar
Member
 
Join Date: Mar 2008
Location: chennai
Posts: 70
#11: Feb 13 '09

re: PHP Reports


Quote:

Originally Posted by ddtpmyra View Post

I thought I gave enough information already... stating MYSQL is the database and output can be downloaded on pdf or excel format. And Im just asking for suggestion how to do this.

i think the below code may help you.the below code can be used to export the
datas from mysql to excelsheet export format.

Expand|Select|Wrap|Line Numbers
  1. <?
  2. // Connect database. 
  3. mysql_connect("localhost","","");
  4. mysql_select_db("tutorial");
  5.  
  6. // Get data records from table. 
  7. $result=mysql_query("select * from name_list order by id asc");
  8.  
  9. // Functions for export to excel.
  10. function xlsBOF() { 
  11. echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0); 
  12. return; 
  13. function xlsEOF() { 
  14. echo pack("ss", 0x0A, 0x00); 
  15. return; 
  16. function xlsWriteNumber($Row, $Col, $Value) { 
  17. echo pack("sssss", 0x203, 14, $Row, $Col, 0x0); 
  18. echo pack("d", $Value); 
  19. return; 
  20. function xlsWriteLabel($Row, $Col, $Value ) { 
  21. $L = strlen($Value); 
  22. echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L); 
  23. echo $Value; 
  24. return; 
  25. header("Pragma: public");
  26. header("Expires: 0");
  27. header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); 
  28. header("Content-Type: application/force-download");
  29. header("Content-Type: application/octet-stream");
  30. header("Content-Type: application/download");;
  31. header("Content-Disposition: attachment;filename=orderlist.xls "); 
  32. header("Content-Transfer-Encoding: binary ");
  33.  
  34. xlsBOF();
  35.  
  36. /*
  37. Make a top line on your excel sheet at line 1 (starting at 0).
  38. The first number is the row number and the second number is the column, both are start at '0'
  39. */
  40.  
  41. xlsWriteLabel(0,0,"List of car company.");
  42.  
  43. // Make column labels. (at line 3)
  44. xlsWriteLabel(2,0,"No.");
  45. xlsWriteLabel(2,1,"Company");
  46.  
  47. $xlsRow = 3;
  48.  
  49. // Put data records from mysql by while loop.
  50. while($row=mysql_fetch_array($result)){
  51.  
  52. xlsWriteNumber($xlsRow,0,$row['id']);
  53. xlsWriteLabel($xlsRow,1,$row['name']);
  54.  
  55. $xlsRow++;
  56. xlsEOF();
  57. exit();
  58. ?>
  59.  
  60.  
Reply