Parameter value not displaying in PHP page using JasperReports

1

I created a report using iReport and displaying in a PHP page. My problem is when I create a parameter and assign it a value, it displays in the preview of iReport but does not display in my PHP page. How can I solve this?

 

My code is

<?php

//Import the PhpJasperLibrary
include_once('PhpJasperLibrary/tcpdf/tcpdf.php');
include_once("PhpJasperLibrary/PHPJasperXML.inc.php");
//database connection details
$server="localhost";
$db="mydb";
$user="root";
$pass="";
$version="0.8b";
$pgport=5432;
$pchartfolder="class/pchart2"; 
//display errors should be off in the php.ini file
ini_set('display_errors', 0);
//setting the path to the created jrxml file
$xml =  simplexml_load_file("report/param1.jrxml");
$PHPJasperXML = new PHPJasperXML();
$PHPJasperXML->arrayParameter=array("acc_id"=>$P{parameter1})‌​);
$PHPJasperXML->xml_dismantle($xml);
$PHPJasperXML->transferDBtoArray($server,$user,$pass,$db);
$PHPJasperXML->outpage("D");    //page output method I:standard output  D:Download file
?>
 
What is the problem in my code.Anybody plz help its very urgent
sruthyms's picture
Joined: Mar 11 2014 - 5:38am
Last seen: 7 years 9 months ago

0 Answers:

No answers yet
Feedback