Jump to content
Changes to the Jaspersoft community edition download ×

Parameter value not displaying in PHP page using JasperReports


sruthyms

Recommended Posts

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
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...