Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Pass parameter to BIRT via PHP
Pass parameter to BIRT via PHP [message #1646975] Tue, 03 March 2015 07:30 Go to next message
Jazz Chan is currently offline Jazz ChanFriend
Messages: 12
Registered: February 2015
Junior Member
I've the following coding in php file and would like to open the BIRT report and pass parameter via php but I got the error(see attached); I can run this report in ECLIPSE Java EE's Report Designer via Run report in web viewer without any problems, I can also copy the link from address bar to another computer and run this report without any problems, so the problem is, I cannot run parameter to the report via PHP?
HTTP ERROR: 404
Problem accessing /viewer/framset. Reason:
ProxyServlet: /viewer/framset
Powered by Jetty://

<?php
if (isset($_POST['print'])) {
	$fname = "C:\Program Files\Eclipse\workspace\GR8LC-PO\po-rpt.rptdesign";
	$paramValue = 28;
	$dest="http://rchk.group.local:8080/viewer/framset?__report=";
	$dest.=urlencode($fname);
	$dest.=";ParaPONO=" . urlencode($paramValue);
	header("Location:$dest");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Print PO</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="./css/style.css" />
</head>

<body>
<form id="printpo" name="printpo" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">
<input name="print" type="submit" style="margin-left: 25%" value="Print" />
</form>
</body>
</html>
  • Attachment: error404.jpg
    (Size: 76.42KB, Downloaded 125 times)
Re: Pass parameter to BIRT via PHP [message #1650449 is a reply to message #1646975] Wed, 04 March 2015 21:00 Go to previous messageGo to next message
Jesse Freeman is currently offline Jesse FreemanFriend
Messages: 184
Registered: January 2015
Senior Member
Have you tried this with a report that doesn't have a parameter and creating a URL without a parameter?

I'm not a PHP expert but the first thing I see that could be the issue is how you are referencing the report itself. You are passing an absolute path with a windows drive letter.
Does the tomcat on rchk.group.local have accesses to the report design in that absolute path?
Re: Pass parameter to BIRT via PHP [message #1650836 is a reply to message #1650449] Thu, 05 March 2015 02:07 Go to previous messageGo to next message
Jazz Chan is currently offline Jazz ChanFriend
Messages: 12
Registered: February 2015
Junior Member
thanks for the reply and I get the problem fixed by following this articles http://www.codeproject.com/Articles/245115/Integrating-BIRT-reports-with-PHP-Web-sites, one thing would like to clarify is the path of report in $fname should be in full path except the drive letter i.e. the report you put in C:\XAMPP\TOMCAT\webapps\birt-viewer then you have to change it to /XAMPP/TOMCAT/webapps/birt-viewer instead.
Re: Pass parameter to BIRT via PHP [message #1652020 is a reply to message #1650836] Thu, 05 March 2015 16:52 Go to previous message
Jesse Freeman is currently offline Jesse FreemanFriend
Messages: 184
Registered: January 2015
Senior Member
Thanks for the clarification.
I'm glad to hear you got it resolved.
Previous Topic:Cash when deploy a report that uses a library
Next Topic:Paste Format doesn't actually paste format
Goto Forum:
  


Current Time: Sun Jul 21 10:42:20 GMT 2024

Powered by FUDForum. Page generated in 0.04054 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top