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

moncy

Members
  • Posts

    6
  • Joined

  • Last visited

moncy's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. I'm tring to make report using ireport 3.5.2 I'm passing date range as parameter from php file //php code written by me <?php echo "<form name='admin_display_billreport' method='post'>"; echo "<b><u>Bill Report</u></b>"; echo "<table><tr>"; echo "<td>From</td>"; echo "<td>:</td>"; echo "<td><input type='text' name='fromdate'></td></tr>"; echo "<tr>"; echo "<td>To</td>"; echo "<td>:</td>"; echo "<td><input type='text' name='todate'></td></tr>"; echo "<tr>"; echo "<td></td>"; echo "<td></td>"; echo "<td><input type='submit' name='report' value='Report'></td></tr>"; echo "</table>"; if(isset($_POST['report'])) { $fromdate = $_POST['fromdate']; $todate = $_POST['todate']; $compileManager = newJavaClass("net.sf.jasperreports.engine.JasperCompileManager"); $report = $compileManager->compileReport(realpath("bill_report.jrxml")); // Get the database connection $objClass = new Java("java.lang.Class"); $objClass->forName('com.mysql.jdbc.Driver'); $objDbm = new Java("java.sql.DriverManager"); $objDbConnect = $objDbm->getConnection("jdbc:mysql://localhost/db", "root", ""); $fillManager = new JavaClass("net.sf.jasperreports.engine.JasperFillManager"); $params = new Java("java.util.HashMap"); $params->put('fromdate', '$fromdate'); $params->put('todate', '$todate'); $jasperPrint = $fillManager->fillReport($report, $params, $objDbConnect); $exportManager = new JavaClass("net.sf.jasperreports.engine.JasperExportManager"); $outputPath = realpath(".")."/"."bill_report.pdf"; $exportManager->exportReportToPdfFile($jasperPrint, $outputPath); header ('Location: bill_report.pdf'); } echo "</form>"; ?> I read your blog on your website : http://www.rjohnson.id.au/wordpress/2007/10/ I followed all the steps. I’m using xampp package for apache & sql connectivity. Since I’m using ireport 3.5.2, I not sure which lib folder are you referring in step 3 (there are 3 lib folder’s in ireport 3.5.2) I copied all the files from ‘C:\Program Files\JasperSoft\iReport-nb-3.5.2\ide8\modules\lib’ directory to the ‘C:\Program Files\Java\jdk1.6.0_13\jre\lib\ext’ directory. As said in step 4 & 5, I download the ‘php-java-bridge_6.1.2.1_documentation.zip’ file from http://en.sourceforge.jp/projects/sfnet_php-java-bridge/releases/?fulllist=1, unzipped the src.zip. Copied all the contents of java directory to the php application. I could not find ‘JavaBridge.jar’ from the ext directory in the download. So downloaded it separately and copied to the java directory in the php application. Then runned the java backend i.e JavaBridge.jar file (using jdk1.6.0_13) But it showing error : Fatal error: Class 'JavaClass' not found in C:\xampp\htdocs\workflow\UI\admin_display_billreport.php on line 23 I think this error is due to some problem related to ‘C:\xampp\htdocs\workflow\java\Java.inc’ file. I runned JavaBridge.jar file. It asked me which port to use. I choose SERVLET_LOCAL:8082 Then I tried to run the index.php.text file which I got from http://www.rjohnson.id.au/wordpress/2007/10/27/bullet-proof-jasper-reports-and-php/ website. It displayed this error : Fatal error: Uncaught [[o:Exception]:"java.lang.Exception: ReferenceClass failed: new net.sf.jasperreports.engine.JasperCompileManager. Cause: java.lang.ClassNotFoundException: net.sf.jasperreports.engine.JasperCompileManager VM: 1.6.0_15@http://java.sun.com/" at: #-18 java.net.URLClassLoader$1.run(Unknown Source) #-17 java.security.AccessController.doPrivileged(Native Method) #-16 java.net.URLClassLoader.findClass(Unknown Source) #-15 java.lang.ClassLoader.loadClass(Unknown Source) #-14 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) #-13 java.lang.ClassLoader.loadClass(Unknown Source) #-12 java.lang.ClassLoader.loadClassInternal(Unknown Source) #-11 java.lang.Class.forName0(Native Method) #-10 java.lang.Class.forName(Unknown Source) #-9 php.java.bridge.Util.classForName(Util.java:1491) #-8 php.java.bridge.JavaBridge.CreateObject(JavaBridge.java:435) #-7 php.java.bridge.Request.handleRequest(Request.java:444) #-6 php.java.bridge.Request.handleRequests(Request.java:500) #-5 php.java.bridge.JavaBridge.handleRequ in C:\xampp\htdocs\workflow\java\Java.inc on line 195 Few websites through which I had gone 1) http://www.rjohnson.id.au/wordpress/2007/10/27/bullet-proof-jasper-reports-and-php/ 2) http://www.rjohnson.id.au/wordpress/2007/02/04/jasper-reports-and-php/ 3) http://jasperforge.org//website/ireportwebsite/IR%20Website/ir_documentation.html?header=project&target=ireport 4) http://en.sourceforge.jp/projects/sfnet_php-java-bridge/releases/?fulllist=1 5) http://php-java-bridge.sourceforge.net/pjb/examples.php 6) http://www.micromegastudio.com/index.php?aid=30 7) http://tuxrx.org/content/howto-php-5-php-java-bridge-apache-22x-tomcat-5x-proxyajp 8) http://bytes.com/topic/php/answers/517656-php-java 9) http://drupal.org/node/617922 10) http://www.issociate.de/board/post/475361/calling_java_within_php_setup?.html 11) http://www.phpbuilder.com/board/archive/index.php/t-7100719.html I’m totally screwed up help me in this matter if you can. Mail me to my id moncy@etipl.com & moncy_mathai@yahoo.co.in Thanx in advance. Regards, Moncy Mathai
  2. hiiiiiiii............matt...........hw r u??????? I'm new to ireport 3.5.2. I'm want to pass a value stored in a variable in subreport to the main report through parameter or any other way if you can suggest. It'll be great help if you can. Reply me here and to my mail id moncy@etipl.com & moncy_mathai@yahoo.co.in if you can. Thanx, Moncy Mathai
  3. hiiiiiiii............matt...........hw r u??????? I'm new to ireport 3.5.2. I'm want to pass a value stored in a variable in subreport to the main report through parameter or any other way if you can suggest. It'll be great help if you can. Reply me here and to my mail id moncy@etipl.com & moncy_mathai@yahoo.co.in if you can. Thanx, Moncy Mathai
  4. hiiiiiiii............matt...........hw r u??????? I'm new to ireport 3.5.2. I'm want to pass a value stored in a variable in subreport to the main report through parameter or any other way if you can suggest. It'll be great help if you can. Reply me here and to my mail id moncy@etipl.com & moncy_mathai@yahoo.co.in if you can. Thanx, Moncy Mathai
  5. hi..........good morning............. I'm Moncy Mathai..........i'm a fresher.......just joined a software company............. i have been asked to work on iReport 3.5.2............. i learned to desing jrxml file & create connection between jrxml file & database. I got into a problem. Problem is that only the first data from the table is executed. i'm sending you the code of jrxml file which i created & also the jrxml file & jasper file is attached. I'll be thank full to u if u can help me in this matter. Thanks a lot in advance. Attach : 1) bill_report.jrxml 2) bill_report.jasper Code:<?xml version="1.0" encoding="UTF-8"?><jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report name" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"> <queryString> <![CDATA[sELECT billmaster.`BILLNUMBER` AS billmaster_BILLNUMBER, billmaster.`POID` AS billmaster_POID, billmaster.`BILLVALUE` AS billmaster_BILLVALUEFROM `billmaster` billmaster]]> </queryString> <field name="billmaster_BILLNUMBER" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="billmaster_POID" class="java.lang.Integer"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="billmaster_BILLVALUE" class="java.lang.Float"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <background> <band splitType="Stretch"/> </background> <title> <band height="85" splitType="Stretch"> <staticText> <reportElement x="20" y="26" width="126" height="39"/> <textElement> <font size="22"/> </textElement> <text><![CDATA[bill Report]]></text> </staticText> <staticText> <reportElement x="184" y="47" width="41" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[From]]></text> </staticText> <line> <reportElement x="246" y="66" width="100" height="1"/> </line> <staticText> <reportElement x="366" y="47" width="37" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[To]]></text> </staticText> <line> <reportElement x="436" y="65" width="100" height="1"/> </line> </band> </title> <pageHeader> <band height="19" splitType="Stretch"/> </pageHeader> <columnHeader> <band height="85" splitType="Stretch"> <rectangle> <reportElement x="20" y="9" width="516" height="76"/> </rectangle> <line> <reportElement x="77" y="9" width="1" height="76"/> </line> <line> <reportElement x="146" y="9" width="1" height="76"/> </line> <line> <reportElement x="443" y="10" width="1" height="75"/> </line> <staticText> <reportElement x="31" y="36" width="34" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[s.No]]></text> </staticText> <staticText> <reportElement x="84" y="36" width="45" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[bill No]]></text> </staticText> <staticText> <reportElement x="159" y="36" width="100" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[Vendor Name]]></text> </staticText> <staticText> <reportElement x="361" y="36" width="75" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[submit Rate]]></text> </staticText> <staticText> <reportElement x="444" y="36" width="92" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[settled Amount]]></text> </staticText> <line> <reportElement x="355" y="9" width="1" height="76"/> </line> </band> </columnHeader> <detail> <band height="352" splitType="Stretch"> <rectangle> <reportElement x="20" y="0" width="516" height="352"/> </rectangle> <textField> <reportElement x="84" y="9" width="58" height="58"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{billmaster_BILLNUMBER}]]></textFieldExpression> </textField> <textField> <reportElement x="454" y="9" width="72" height="44"/> <textElement/> <textFieldExpression class="java.lang.Float"><![CDATA[$F{billmaster_BILLVALUE}]]></textFieldExpression> </textField> <line> <reportElement x="443" y="0" width="1" height="352"/> </line> <line> <reportElement x="355" y="0" width="1" height="352"/> </line> <line> <reportElement x="77" y="0" width="1" height="352"/> </line> <line> <reportElement x="146" y="0" width="1" height="352"/> </line> </band> </detail> <columnFooter> <band height="62" splitType="Stretch"> <rectangle> <reportElement x="20" y="0" width="516" height="50"/> </rectangle> <staticText> <reportElement x="225" y="17" width="100" height="20"/> <textElement> <font size="12"/> </textElement> <text><![CDATA[Total]]></text> </staticText> <line> <reportElement x="77" y="0" width="1" height="50"/> </line> <line> <reportElement x="146" y="0" width="1" height="50"/> </line> <line> <reportElement x="355" y="0" width="1" height="50"/> </line> <line> <reportElement x="443" y="0" width="1" height="50"/> </line> </band> </columnFooter> <pageFooter> <band height="54" splitType="Stretch"/> </pageFooter> <summary> <band height="42" splitType="Stretch"/> </summary></jasperReport>
  6. hiii...........good morning................. I'm Moncy Mathai..........i'm working in a software company & is a fresher......... i have been asked to understand ireport 3.5.2 i learned how to design & make connection between jrxml file & database. i got stuck in a problem. Problem is that connection is made but only the 1st data from the database is shown. if u can help me in this matter it will be help full. sql query which is gave is select * from table_name;
×
×
  • Create New...