PHP Reports  | Familiar Sight | | Join Date: Jun 2008 Location: CA
Posts: 222
| | |
Hi,
Anybody who can recommend a best freeware reporting tool for PHP? A user friendly or easy to develop.
thanks!
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,664
| | | re: PHP Reports
what do you mean by "reporting tool"?
|  | Familiar Sight | | Join Date: Jun 2008 Location: CA
Posts: 222
| | | 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.
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,664
| | | re: PHP Reports
what queries? I still can't figure it out.
|  | Expert | | Join Date: Feb 2008 Location: Australia
Posts: 914
| | | 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.
|  | Familiar Sight | | Join Date: Jun 2008 Location: CA
Posts: 222
| | | 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
|  | Expert | | Join Date: Feb 2008 Location: Australia
Posts: 914
| | | 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.?
|  | Familiar Sight | | Join Date: Jun 2008 Location: CA
Posts: 222
| | | re: PHP Reports
Yes, can be download on a excel or pdf format
|  | Expert | | Join Date: Feb 2008 Location: Australia
Posts: 914
| | | 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.
|  | Familiar Sight | | Join Date: Jun 2008 Location: CA
Posts: 222
| | | 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.
|  | Member | | Join Date: Mar 2008 Location: chennai
Posts: 70
| | | re: PHP Reports Quote:
Originally Posted by ddtpmyra 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. -
<?
-
// Connect database.
-
mysql_connect("localhost","","");
-
mysql_select_db("tutorial");
-
-
// Get data records from table.
-
$result=mysql_query("select * from name_list order by id asc");
-
-
// Functions for export to excel.
-
function xlsBOF() {
-
echo pack("ssssss", 0x809, 0x8, 0x0, 0x10, 0x0, 0x0);
-
return;
-
}
-
function xlsEOF() {
-
echo pack("ss", 0x0A, 0x00);
-
return;
-
}
-
function xlsWriteNumber($Row, $Col, $Value) {
-
echo pack("sssss", 0x203, 14, $Row, $Col, 0x0);
-
echo pack("d", $Value);
-
return;
-
}
-
function xlsWriteLabel($Row, $Col, $Value ) {
-
$L = strlen($Value);
-
echo pack("ssssss", 0x204, 8 + $L, $Row, $Col, 0x0, $L);
-
echo $Value;
-
return;
-
}
-
header("Pragma: public");
-
header("Expires: 0");
-
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
-
header("Content-Type: application/force-download");
-
header("Content-Type: application/octet-stream");
-
header("Content-Type: application/download");;
-
header("Content-Disposition: attachment;filename=orderlist.xls ");
-
header("Content-Transfer-Encoding: binary ");
-
-
xlsBOF();
-
-
/*
-
Make a top line on your excel sheet at line 1 (starting at 0).
-
The first number is the row number and the second number is the column, both are start at '0'
-
*/
-
-
xlsWriteLabel(0,0,"List of car company.");
-
-
// Make column labels. (at line 3)
-
xlsWriteLabel(2,0,"No.");
-
xlsWriteLabel(2,1,"Company");
-
-
$xlsRow = 3;
-
-
// Put data records from mysql by while loop.
-
while($row=mysql_fetch_array($result)){
-
-
xlsWriteNumber($xlsRow,0,$row['id']);
-
xlsWriteLabel($xlsRow,1,$row['name']);
-
-
$xlsRow++;
-
}
-
xlsEOF();
-
exit();
-
?>
-
-
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,537 network members.
|