PHP Reports

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ddtpmyra
    Contributor
    • Jun 2008
    • 333

    PHP Reports

    Hi,

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

    thanks!
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    what do you mean by "reporting tool"?

    Comment

    • ddtpmyra
      Contributor
      • Jun 2008
      • 333

      #3
      Hi Dormilich,
      Im looking for a web base reporting tool where the user can dowloaded or run the result of the queries.

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        what queries? I still can't figure it out.

        Comment

        • TheServant
          Recognized Expert Top Contributor
          • Feb 2008
          • 1168

          #5
          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.

          Comment

          • ddtpmyra
            Contributor
            • Jun 2008
            • 333

            #6
            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

            Comment

            • TheServant
              Recognized Expert Top Contributor
              • Feb 2008
              • 1168

              #7
              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.?

              Comment

              • ddtpmyra
                Contributor
                • Jun 2008
                • 333

                #8
                Yes, can be download on a excel or pdf format

                Comment

                • TheServant
                  Recognized Expert Top Contributor
                  • Feb 2008
                  • 1168

                  #9
                  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.

                  Comment

                  • ddtpmyra
                    Contributor
                    • Jun 2008
                    • 333

                    #10
                    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.

                    Comment

                    • mageswar005
                      New Member
                      • Mar 2008
                      • 72

                      #11
                      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.

                      [CODE=PHP]
                      <?
                      // Connect database.
                      mysql_connect(" localhost",""," ");
                      mysql_select_db ("tutorial") ;

                      // Get data records from table.
                      $result=mysql_q uery("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;file name=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=mysq l_fetch_array($ result)){

                      xlsWriteNumber( $xlsRow,0,$row['id']);
                      xlsWriteLabel($ xlsRow,1,$row['name']);

                      $xlsRow++;
                      }
                      xlsEOF();
                      exit();
                      ?>

                      [/CODE]

                      Comment

                      Working...