Jump to content

How to get the PHPReportMaker.php in to my system.


sasi

Recommended Posts

  Hello every body,

 

              I got some help to generate reports in php using XML and data from the database.But In my sytem i have to get the PHPreportMaker.php.

 

can anybody help me.Here is the code of xml and php files.This is the xml file

<?xml version="1.0" standalone="no"?>
<REPORT>
   <TITLE>Sales Report</TITLE>
   <BACKGROUND_COLOR>#FFFFFF</BACKGROUND_COLOR>
   <PAGE SIZE="25"></PAGE>
   <GROUPS>
      <GROUP NAME="maingroup">
         <FIELDS>
            <ROW>
               <COL TYPE="FIELD">id</COL>
               <COL TYPE="FIELD">name</COL>
               <COL TYPE="FIELD">city</COL>
               <COL TYPE="FIELD">product</COL>
               <COL TYPE="FIELD">value</COL>
            </ROW>
         </FIELDS>
      </GROUP>
   </GROUPS>
</REPORT>

This is the php file

<?php
   // include the PHPReports classes on the PHP path! configure your path here
   ini_set("include_path",ini_get("include_path").":/www/mic/phpreports/"); 
   include "PHPReportMaker.php";

   $sSQL = "select * from saleslog order by city,id";
   $oRpt = new PHPReportMaker();

   $oRpt->setXML("sales.xml");
   $oRpt->setUser("root");
   $oRpt->setPassword("");
   $oRpt->setConnection("localhost");
   $oRpt->setDatabaseInterface("mysql");
   $oRpt->setSQL($sSQL);
   $oRpt->setDatabase("mic");
   $oRpt->run();
?>

 

The ouput on executing in the browser is:

 

Warning: main(PHPReportMaker.php): failed to open stream: No such file or directory in c:\program files\easyphp1-8\www\mic\sales.php on line 4

 

Warning: main(): Failed opening 'PHPReportMaker.php' for inclusion (include_path='.;C:/Program Files/EasyPHP1-8\php\pear\:/www/mic/phpreports/') in c:\program files\easyphp1-8\www\mic\sales.php on line 4

 

Fatal error: Cannot instantiate non-existent class: phpreportmaker in c:\program files\easyphp1-8\www\mic\sales.php on line 7

 

 

 

regards,

sasi.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.