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 /* * To change this template, choose Tools | Templates * and open the template in the editor. */ include_once "./relatorios/class/tcpdf/tcpdf.php"; include_once "./relatorios/class/PHPJasperXML.inc.php"; include_once "./relatorios/setting.php"; $PHPJasperXML = new PHPJasperXML(); //$PHPJasperXML->debugsql=true; $PHPJasperXML->arrayParameter = array("titulo" => "Relatorios de Carros"); $PHPJasperXML->load_xml_file("./relatorios/phpRelatorio.jrxml"); $PHPJasperXML->transferDBtoArray($server, $user, $pass, $db); $PHPJasperXML->outpage("I"); //page output method I:standard output D:Download file
<?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
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ $filename = $_GET["filename"]; include_once 'class/tcpdf/tcpdf.php'; include_once "class/PHPJasperXML.inc.php"; include_once 'setting.php'; $xml = simplexml_load_file("sample6.jrxml"); $PHPJasperXML = new PHPJasperXML(); $PHPJasperXML->debugsql = false; $PHPJasperXML->arrayParameter = array(); $PHPJasperXML->xml_dismantle($xml); $PHPJasperXML->transferDBtoArray($server, $user, $pass, $db); $PHPJasperXML->outpage("F", "tmp/{$filename}"); //page output method I:standard output D:Download file, F =save as filename and submit 2nd parameter as destinate file name //$PHPJasperXML->outpage("I"); //page output method I:standard output D:Download file
<?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
function CI_Phpjasperxml($params = array("lang" => "en", "pdflib" => "FPDF")) { $lang = "en"; $pdflib = "FPDF"; // default language if (isset($params['lang'])) { $lang = $params['lang']; } // default library if (isset($params['pdflib'])) { $pdflib = $params['pdflib']; } // tcpdf constructor parent::__construct($lang, $pdflib); }
require_once "../class/PHPJasperXML.inc.php"; //require_once("class/PHPJasperXMLSubReport.inc.php"); require_once '../../setup.php'; require_once '../../models/tb_pcp_etiqueta.php'; date_default_timezone_set('America/Sao_Paulo'); $co_pcp_apontamento = $_GET['co_pcp_apontamento']; error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); $server = DSN; $db = "extranet"; $user = USER; $pass = PASS; $version = "0.8b"; $pgport = 5432; $pchartfolder = "../class/pchart2"; $timestamp = date("d/m/Y") . " " . date("h:i:s"); $co_usuario = $_SESSION['codigoUsuario']; $_etiqueta = new tb_pcp_etiqueta($conexaoERP); $_etiqueta->proc_etiqueta_peca($co_pcp_apontamento, $co_usuario); $xml = simplexml_load_file("etiqueta_peca.jrxml"); $PHPJasperXML = new PHPJasperXML(); //$PHPJasperXML->debugsql=true; $PHPJasperXML->arrayParameter = array("CO_PCP_APONTAMENTO" => $co_pcp_apontamento, "CO_USUARIO" => $co_usuario); $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, $user, $pass, $db); //$PHPJasperXML->outpage("F",APP_PATH.'barcodes'.DS.date("dmYhis").".pdf"); //page output method I:standard output D:Download file $PHPJasperXML->outpage("I", date("dmYhis")); //page output method I:standard output D:Download file $_etiqueta->limparTemporariaEtiquetaPeca($co_usuario); $data = true;
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'; 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
<?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 $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
<?php include_once 'class/tcpdf/tcpdf.php'; include "class/PHPJasperXML.inc.php"; // Creating a workbook include 'setting.php'; //$xml = simplexml_load_file("sample9.jrxml"); $xml = simplexml_load_file("sample4.jrxml"); $PHPJasperXML = new PHPJasperXML("en", "XLS"); //$PHPJasperXML->debugsql=true; $PHPJasperXML->arrayParameter = array("parameter1" => 0); $PHPJasperXML->xml_dismantle($xml); $PHPJasperXML->transferDBtoArray($server, $user, $pass, $db); $PHPJasperXML->outpage("I", "sample9.xls"); //page output method I:standard output D:Download file /* // sending HTTP headers // Creating a worksheet // The actual data $worksheet->write(0, 0, 'Name'); $worksheet->write(0, 1, 'Age'); $worksheet->write(1, 0, 'John Smith'); $worksheet->write(1, 1, 30); $worksheet->write(2, 0, 'Johann Schmidt'); $worksheet->write(2, 1, 31); $worksheet->write(3, 0, 'Juan Herrera'); $worksheet->write(3, 1, 32);
<?php /* * To change this template, choose Tools | Templates and open the template in * the editor. */ $filename = $_GET ["filename"]; include_once ('class/tcpdf/tcpdf.php'); include_once ("class/PHPJasperXML.inc.php"); include_once ('setting.php'); $xml = simplexml_load_file ( "sample6.jrxml" ); $PHPJasperXML = new PHPJasperXML (); $PHPJasperXML->debugsql = false; $PHPJasperXML->arrayParameter = array (); $PHPJasperXML->xml_dismantle ( $xml ); $PHPJasperXML->transferDBtoArray ( $server, $user, $pass, $db ); $PHPJasperXML->outpage ( "F", "tmp/$filename" ); // page output method I:standard // output D:Download file, F =save // as filename and submit 2nd // parameter as destinate file name // $PHPJasperXML->outpage("I"); // //page output method I:standard // output D:Download file ?>
case "fgtm": $xml = simplexml_load_file("rptFGTM.jrxml"); break; case "saidi": $xml = simplexml_load_file("rptSAIDI.jrxml"); break; 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);
<?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 ?>
{ session_start(); $_SESSION["start_date"]=$start_date; $_SESSION["end_date"]=$end_date; }*/ if (isset($_POST['relTipo_PDF'])) { ob_end_clean(); include_once '/var/www/hopeFestival/resources/reports/phpJasperXml/class/tcpdf/tcpdf.php'; include_once "/var/www/hopeFestival/resources/reports/phpJasperXml/class/PHPJasperXML.inc.php"; include_once '/var/www/hopeFestival/resources/reports/phpJasperXml/setting.php'; $begindb = '2015-10-20' . " 00:00:00"; $enddb = '2015-10-22' . "23:59:59"; $PHPJasperXML = new PHPJasperXML(); $PHPJasperXML->debugsql = false; $PHPJasperXML->arrayParameter = array("begin" => "'" . $begindb . "'", "end" => "'" . $enddb . "'", "total" => $total, "date_generation" => date("d/m/Y"), "hour_generation" => date("H:i:s")); $PHPJasperXML = new PHPJasperXML(); $PHPJasperXML->debugsql = false; $PHPJasperXML->arrayParameter = array(); $PHPJasperXML->load_xml_file("/var/www/hopeFestival/resources/reports/counselors/report1.jrxml"); $PHPJasperXML->transferDBtoArray($server, $user, $pass, $db); $PHPJasperXML->outpage("D", "FE2015_relatorio-conselheiros_" . date("d/m/Y H:i") . ".pdf"); //page output method I:standard output D:Download file exit; } /*if (isset($_POST["relTipo_PDF"])) { print_r("expression"); exit; ob_clean(); include_once('phpJasperXml/class/tcpdf/tcpdf.php');
<?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 ?>
<?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 ?>