Esempio n. 1
3
 function specific($lendingid)
 {
     $xml = simplexml_load_file('C:/wamp/www/ccb/application/reports/specificloan.jrxml');
     $report = new PHPJasperXML();
     $report->debugsql = false;
     $report->arrayParameter = array("id" => $lendingid);
     $report->xml_dismantle($xml);
     $report->transferDBtoArray('localhost', 'root', 'ccbpe2015', 'ccb');
     $report->outpage("D");
 }
 function dumps($report, $options = array())
 {
     $defaultOptions = array('add_logo_arg' => true);
     $options = self::mergeOptions($options, $defaultOptions);
     if ($options['add_logo_arg']) {
         $report->addArg('logo', $this->logoPath());
     }
     $xml = $this->loadReportSource($report->templateName());
     $builder = new PHPJasperXML();
     $builder->debugsql = false;
     $builder->arrayParameter = $report->args;
     $builder->xml_dismantle($xml);
     $builder->transferDBtoArray($this->settings['db']->hostname, $this->settings['db']->username, $this->settings['db']->password, $this->settings['db']->dbname, $this->settings['db']->port);
     // I: standard output, D: Download file, F: file
     $builder->outpage('I');
 }
<?php

include "system.php";
include_once '../simantz/class/fpdf/fpdf.php';
include_once "../simantz/class/PHPJasperXML.inc";
$companyname = "{$o->companyname} ({$o->companyno})";
$company_addressinfo = "{$o->street1} {$o->street2} \t{$o->street3}\n" . "{$o->city} {$o->state} {$o->country_name}\n" . "Tel: {$o->tel_1} {$o->tel_2} Fax: {$o->fax} \nWeb:{$o->url} Email: {$o->email}";
//$fp = fopen("jasperxml/salesquotation.jrxml","r");
$xml = simplexml_load_file("bpartnerstatement.jrxml");
//fclose($fp);
$bpartnerlist = implode(",", $_GET['bpartner_array']);
$reporttype = $_GET['reporttype'];
if ($reporttype == 'd') {
    $accounttype = "debtor";
} elseif ($reporttype == 'c') {
    $accounttype = "creditor";
} else {
    echo "Cannot generate this report due to parameter error";
    exit(1);
}
$enddate = $_GET['enddate'];
$startdate = $_GET['startdate'];
$statementdate = $_GET['statementdate'];
//echo print_r($_GET);
$PHPJasperXML = new PHPJasperXML();
//$PHPJasperXML->debugsql=true;
$PHPJasperXML->arrayParameter = array("statementdate" => $statementdate, "bpartnerlist" => $bpartnerlist, "accounttype" => $accounttype, "startdate" => $startdate, "enddate" => $enddate, "company_name" => $companyname, "company_addressinfo" => $company_addressinfo);
$PHPJasperXML->xml_dismantle($xml);
$PHPJasperXML->transferDBtoArray(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS, XOOPS_DB_NAME);
$PHPJasperXML->outpage("I");
//page output method I:standard output  D:Download file
Esempio n. 4
2
<?php

/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
include_once 'class/tcpdf/tcpdf.php';
include_once "class/PHPJasperXML.inc.php";
include_once 'setting.php';
error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
$xml = simplexml_load_file("sample2.jrxml");
$PHPJasperXML = new PHPJasperXML();
//$PHPJasperXML->debugsql=true;
$PHPJasperXML->arrayParameter = array("parameter1" => 1);
$PHPJasperXML->xml_dismantle($xml);
//$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db); * use this line if you want to connect with mysql
//if you want to use universal odbc connection, please create a dsn connection in odbc first
$PHPJasperXML->transferDBtoArray($server, "postgres", "postgres", "phpjasperxml", "odbc");
//odbc = connect to odbc
$PHPJasperXML->outpage("I");
//page output method I:standard output  D:Download file
Esempio n. 5
1
    case "fgtm":
        $xml = simplexml_load_file("RPT_FGTM.jrxml");
        break;
    case "saidi":
        $xml = simplexml_load_file("RPT_SAIDI.jrxml");
}
//$xml =  simplexml_load_file("RPT_FGTM.jrxml");
//$xml =  simplexml_load_file("RPT_SAIDI.jrxml");
switch ($_GET['type']) {
    case "pdf":
        $PHPJasperXML = new PHPJasperXML();
        //$PHPJasperXML->debugsql=true;
        //$PHPJasperXML->arrayParameter=array("parameter1"=>1);
        $PHPJasperXML->xml_dismantle($xml);
        //$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db);
        //$odbc_name='arsan_scada';
        $PHPJasperXML->transferDBtoArray("localhost", "arsan", "a1254n", "arsan_scada", "odbc");
        //$PHPJasperXML->odbc_connect("Driver={SQL Server Native Client 10.0};Server=localhost;Database=reportScada;", "arsan", "a1254n");
        $PHPJasperXML->outpage("I", "report_" . $GET['name'] . $date . ".pdf");
        //page output method I:standard output  D:Download file
        break;
    case "xls":
        $PHPJasperXML = new PHPJasperXML("en", "XLS");
        //$PHPJasperXML->debugsql=true;
        //$PHPJasperXML->arrayParameter=array("parameter1"=>1);
        $PHPJasperXML->xml_dismantle($xml);
        $PHPJasperXML->transferDBtoArray("localhost", "arsan", "a1254n", "arsan_scada", "odbc");
        $PHPJasperXML->outpage("I", "report.xls");
        //page output method I:standard output  D:Download file
        break;
}
<?php
/*
 * To change this template, choose Tools | Templates and open the template in
 * the editor.
 */
include_once ('class/tcpdf/tcpdf.php');
include_once ("class/PHPJasperXML.inc.php");
include_once ('setting.php');

$xml = simplexml_load_file ( "adm_lancamentos_devedores.jrxml" );

$PHPJasperXML = new PHPJasperXML ();
// $PHPJasperXML->debugsql=true;
$PHPJasperXML->arrayParameter = array (
		"parameter1" => 1 
);
$PHPJasperXML->xml_dismantle ( $xml );

$PHPJasperXML->transferDBtoArray ( $server, $user, $pass, $db );
$PHPJasperXML->outpage ( "I" ); // page output method I:standard output D:Download
                             // file

?>
Esempio n. 7
0
 */

include_once ('class/tcpdf/tcpdf.php');
include_once ("class/PHPJasperXML.inc.php");
include_once ('setting.php');
error_reporting ( E_ERROR | E_WARNING | E_PARSE | E_NOTICE );

$xml = simplexml_load_file ( "sample2.jrxml" );

$PHPJasperXML = new PHPJasperXML ();
// $PHPJasperXML->debugsql=true;
$PHPJasperXML->arrayParameter = array (
		"parameter1" => 1 
);
$PHPJasperXML->xml_dismantle ( $xml );

// $PHPJasperXML->transferDBtoArray($server,$user,$pass,$db); * use this line if
// you want to connect with mysql
$user = "******";
$pass = "******";
$pgport = 5432;
// if you want to use universal odbc connection, please create a dsn connection
// in odbc first
$PHPJasperXML->transferDBtoArray ( $server, $user, $pass, "phpjasperxml", "psql" ); // (default:mysql,
                                                                             // accept
                                                                             // value=mysql,odbc,psql)
$PHPJasperXML->outpage ( "I" ); // page output method I:standard output D:Download
                             // file

?>
Esempio n. 8
0
    case "ufr":
        //$xml =  simplexml_load_file("rptUFR.jrxml");break;
}
//$xml =  simplexml_load_file("RPT_FGTM.jrxml");
//$xml =  simplexml_load_file("RPT_SAIDI.jrxml");
switch ($_GET['type']) {
    case "pdf":
        //$bulan=$_GET['month'];
        //$tahun=$_GET['year'];
        $PHPJasperXML = new PHPJasperXML();
        //$PHPJasperXML->debugsql=true;
        $PHPJasperXML->arrayParameter = array("bulan" => $_GET['month'], "tahun" => $_GET['year']);
        $PHPJasperXML->xml_dismantle($xml);
        //$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db);
        //$odbc_name='arsan_scada';
        //$PHPJasperXML->transferDBtoArray("localhost","arsan","a1254n","arsan_scada","odbc");
        $PHPJasperXML->transferDBtoArray($dbSettings['hostname'], $dbSettings['username'], $dbSettings['password'], $dbSettings['dbname'], "odbc");
        //$PHPJasperXML->odbc_connect("Driver={SQL Server Native Client 10.0};Server=localhost;Database=reportScada;", "arsan", "a1254n");
        $PHPJasperXML->outpage("I", "report_" . $GET['name'] . $date . ".pdf");
        //page output method I:standard output  D:Download file
        break;
        /*     case "xls":
                $PHPJasperXML = new PHPJasperXML("en","XLS");
                //$PHPJasperXML->debugsql=true;
                //$PHPJasperXML->arrayParameter=array("parameter1"=>1);
        		$PHPJasperXML->arrayParameter=array("bulan"=>$_GET['month'], "tahun"=>$_GET['year']);
                $PHPJasperXML->xml_dismantle($xml);
                $PHPJasperXML->transferDBtoArray("localhost","arsan","a1254n","arsan_scada","odbc");
                $PHPJasperXML->outpage("I","report.xls");    //page output method I:standard output  D:Download file
        		break; */
}
Esempio n. 9
0
include_once ('class/tcpdf/tcpdf.php');
include_once ("class/PHPJasperXML.inc.php");
include_once ('setting.php');
error_reporting ( E_ERROR | E_WARNING | E_PARSE | E_NOTICE );

$xml = simplexml_load_file ( "sample2.jrxml" );

$PHPJasperXML = new PHPJasperXML ();
// $PHPJasperXML->debugsql=true;
$PHPJasperXML->arrayParameter = array (
		"parameter1" => 1 
);
$PHPJasperXML->xml_dismantle ( $xml );

$PHPJasperXML->transferDBtoArray ( $server, $user, $pass, $db ); // * use this line if
                                                           // you want to
                                                           // connect with mysql
                                                           
// if you want to use universal odbc connection, please create a dsn connection
                                                           // in odbc first
                                                           // $PHPJasperXML->transferDBtoArray($server,"odbcuser","odbcpass","phpjasperxml","odbc");
                                                           // //odbc = connect
                                                           // to odbc
                                                           // $PHPJasperXML->transferDBtoArray($server,"psqluser","psqlpass","phpjasperxml","psql");
                                                           // //odbc = connect
                                                           // to potgresql
$PHPJasperXML->outpage ( "I" ); // page output method I:standard output D:Download
                             // file

?>
Esempio n. 10
0
<?php

include_once "PHPJasperXML.inc";
include_once 'fpdf/fpdf.php';
//include_once "../../mainfile.php";
/*$data=$_POST['a'];
$select=$_POST['select'];
$i=0;
$para="";
	foreach($data as $line){
	$line ."->".$select[$i]."<br>";
	if($select[$i]=="on")
	$para=$para.$line.",";
	$i++;
	}
$para=substr($para,0,-1);
*/
$xml = simplexml_load_file('yearly cso.jrxml');
//file name
$PHPJasperXML = new PHPJasperXML();
$PHPJasperXML->arrayParameter = array("summary_id" => "1");
$PHPJasperXML->xml_dismantle($xml);
$PHPJasperXML->transferDBtoArray("localhost", "root", "mysql", "simdigi");
//$PHPJasperXML->transferDBtoArray(url,dbuser,dbpassword,db);
$PHPJasperXML->outpage("I");
//page output method I:standard output	D:Download file	F:Save to local file	S:Return as a string
//$PHPJasperXML->test();//test's function
?>

Esempio n. 11
0
<?php
include_once "PHPJasperXML.inc";
include_once ('fpdf/fpdf.php');
// include_once "../../mainfile.php";
/*
 * $data=$_POST['a']; $select=$_POST['select']; $i=0; $para=""; foreach($data as
 * $line){ $line ."->".$select[$i]."<br>"; if($select[$i]=="on")
 * $para=$para.$line.","; $i++; } $para=substr($para,0,-1);
 */

$xml = simplexml_load_file ( 'yearly cso.jrxml' ); // file name
$PHPJasperXML = new PHPJasperXML ();
$PHPJasperXML->arrayParameter = array (
		"summary_id" => "1" 
);
$PHPJasperXML->xml_dismantle ( $xml );
$PHPJasperXML->transferDBtoArray ( "localhost", "root", "mysql", "simdigi" ); // $PHPJasperXML->transferDBtoArray(url,dbuser,dbpassword,db);
$PHPJasperXML->outpage ( "I" ); // page output method I:standard output D:Download
                             // file F:Save to local file S:Return as a string
                             // $PHPJasperXML->test();//test's function

?>