Jump to content
We've recently updated our Privacy Statement, available here ×

ptm1236

Members
  • Posts

    1
  • Joined

  • Last visited

ptm1236's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hello! Doubt iReport (5.6.0) and PHP (5.3.5) Report generation interval of dates: -------- In iReport, SQL, Field: cpagar.`dtvenc` -> java.sql.Date parameters: date1 and date2 -> java.util.Date ...Where - > cpagar.`dtvenc` between $P{data1} and $P{data2} In IReport the report is generated normally. In PHP does not work. See PHP code below. Any tips? Thanks <?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 ('../class/setting.php'); // $xml = simplexml_load_file("relCPagar01.jrxml"); $PHPJasperXML = new PHPJasperXML(); //$PHPJasperXML->debugsql=false; // receives the dates as parameters in string $data1=$_GET["data1"]; $data2=$_GET["data2"]; // convert to format MySQl (yyyy-mm-dd) $WD1 = implode("-",array_reverse(explode("/",$data1))); $WD2 = implode("-",array_reverse(explode("/",$data2))); // passes the parameters with formatted date MYSQL $PHPJasperXML->arrayParameter=array("data1"=>$WD1); $PHPJasperXML->arrayParameter=array("data2"=>$WD2); // $PHPJasperXML->xml_dismantle($xml); $PHPJasperXML->transferDBtoArray($server,$user,$pass,$db); $PHPJasperXML->outpage("I"); //page output method I:standard output D:Download file ?>
×
×
  • Create New...