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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.