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
/*
 * 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

?>