<?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
$_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'); include_once("phpJasperXml/class/PHPJasperXML.inc.php"); include_once ('phpJasperXml/setting.php');