abdujaparov
Members-
Posts
20 -
Joined
-
Last visited
abdujaparov's Achievements
-
Hi, I read it, but I don't understand what I wrong. I have the jasper file and I pass the jasper files to the mainreport. But I also tried to pass the jrxml files and the problem is the same. Now. I don't pass the subreport dir, I pass directly the comple path to the subreport jasper (or jrxml) file. Here subReport1 there is the complete path of the first subreport. In the main report I inserted this xml code: <parameter name="subReportGestore" class="java.lang.Object"/> ...... ...... <subreport isUsingCache="true"> <reportElement x="1" y="5" width="534" height="126" key="subreport-1"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{subReportGestore}]]></subreportExpression> </subreport> I inserted the parameter of the object subreport and then the subreport. The subreport has the same connection of the main report. The main report contrains a query and the subreport contrains another query. So how can I load correctly the subreport? I read the link you passed but I don't understand what is wrong. Thanks, bye bye.
-
Hi, I have 3 jasper files, a main report and two sub report. I created a java class that create a jrprint file. So I have this code: Class.forName(DRIVER); Connection conn = DriverManager.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD); FileInputStream subDesign1=new FileInputStream(subReport1); JasperReport subReport1J=(JasperReport)JRLoader.loadObject(subDesign1); FileInputStream subDesign2=new FileInputStream(subReport2); JasperReport subReport2J=(JasperReport)JRLoader.loadObject(subDesign2); FileInputStream jasperDesign=new FileInputStream(mainReport); JasperReport jasperReport=(JasperReport)JRLoader.loadObject(jasperDesign); parameters = new HashMap(); parameters.put("subReportGestore", subReport2J); parameters.put("subReportFondi", subReport1J); JasperFillManager.fillReportToFile(jasperReport, "/findb/sw/fin/java/CreateReportCPPI/build/reports/Excel.jrprint", parameters, conn); In this way I have only the jrprint of the main report and the file generated from the jrprint contain only the main report the subreport are not inserted in the main. How can I fill the main raport with the subreport? Thanks, bye bye.
-
Hi, I've been trying for days to generate a report. A report is composed by two subreport. I changed the report in this way: Main report <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="Excel" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <parameter name="subReportFondi" class="java.lang.Object"/> <parameter name="subReportGestore" class="java.lang.Object"/> <queryString><![CDATA[sELECT TRUNC(SYSDATE) AS DATA FROM DUAL]]></queryString> <field name="DATA" class="java.sql.Timestamp"/> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="67" isSplitAllowed="true" > <image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="1" y="1" width="364" height="66" key="image-1"/> <box></box> <graphicElement stretchType="NoStretch"/> <imageExpression class="java.lang.String"><![CDATA["/findb/sw/fin/java/CreateReportCPPI/reports/logoBancaIMI.jpg"]]></imageExpression> </image> </band> </title> <pageHeader> <band height="133" isSplitAllowed="true" > <staticText> <reportElement mode="Opaque" x="111" y="0" width="424" height="33" forecolor="#000000" key="subscriptionFORM" positionType="Float"/> <box></box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="16" isUnderline="true"/> </textElement> <text><![CDATA[sUBSCRIPTION FORM]]></text> </staticText> <staticText> <reportElement x="1" y="1" width="109" height="32" key="from"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[From:]]></text> </staticText> <staticText> <reportElement x="1" y="33" width="135" height="23" key="bancaImiSPA"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" isBold="true"/> </textElement> <text><![CDATA[bANCA IMI SPA]]></text> </staticText> <staticText> <reportElement x="1" y="77" width="341" height="23" key="telefono1"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[TEL: #39-02.7261.5463(Enrico COTTINI) or .5446 (Paolo FOSCHIANO)]]></text> </staticText> <staticText> <reportElement x="1" y="100" width="341" height="23" key="confirmationTxt"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[PLEASE SEND CONFIRMATIONS TO: #39-02.7261.5217]]></text> </staticText> <staticText> <reportElement x="1" y="54" width="296" height="23" key="staticText-10"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" isBold="true"/> </textElement> <text><![CDATA[Piazzetta Giordano Dell'Amore, 3 - 20121 - MILANO]]></text> </staticText> </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="135" isSplitAllowed="true" > <line direction="TopDown"> <reportElement x="1" y="3" width="534" height="0" key="line-1"/> <graphicElement stretchType="NoStretch"/> </line> <subreport isUsingCache="true"> <reportElement x="1" y="5" width="534" height="126" key="subreport-1"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{subReportGestore}]]></subreportExpression> </subreport> </band> </detail> <columnFooter> <band height="30" isSplitAllowed="true" > <line direction="TopDown"> <reportElement x="1" y="1" width="534" height="0" key="line-2"/> <graphicElement stretchType="NoStretch"/> </line> </band> </columnFooter> <pageFooter> <band height="224" isSplitAllowed="true" > <staticText> <reportElement x="1" y="1" width="534" height="23" key="subscrptio2"/> <box></box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[sUBSCRIPTION FORM]]></text> </staticText> <subreport isUsingCache="true"> <reportElement x="1" y="104" width="534" height="78" key="subreport-2"/> <connectionExpression><![CDATA[$P{REPORT_CONNECTION}]]></connectionExpression> <subreportExpression class="net.sf.jasperreports.engine.JasperReport"><![CDATA[$P{subReportFondi}]]></subreportExpression> </subreport> <staticText> <reportElement x="1" y="23" width="249" height="23" key="clientDesign"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[Client designation: Banca IMI spa - Strategie Attive]]></text> </staticText> <staticText> <reportElement x="1" y="46" width="59" height="23" key="account"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[Account:]]></text> </staticText> <staticText> <reportElement x="23" y="193" width="146" height="23" key="noDelivery"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[No delivery of certificates.]]></text> </staticText> <staticText> <reportElement x="23" y="81" width="100" height="23" key="nomeFondo-1"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[Fund Name]]></text> </staticText> <staticText> <reportElement x="123" y="81" width="39" height="23" key="staticText-5"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[share class]]></text> </staticText> <staticText> <reportElement x="162" y="81" width="74" height="23" key="staticText-6"/> <box> <topPen lineWidth="1.0" lineStyle="Solid"/> <bottomPen lineWidth="1.0" lineStyle="Solid"/> <rightPen lineWidth="1.0" lineStyle="Solid"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[iSIN CODE]]></text> </staticText> <staticText> <reportElement x="236" y="81" width="55" height="23" key="staticText-7"/> <box> <pen lineWidth="0.0" lineStyle="Solid"/> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[CASH AMOUNT]]></text> </staticText> <staticText> <reportElement x="291" y="81" width="62" height="23" key="staticText-8"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[PAYMENT CURRENCY]]></text> </staticText> <staticText> <reportElement x="353" y="81" width="46" height="23" key="staticText-9"/> <box> <topPen lineWidth="1.0" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineColor="#000000"/> <rightPen lineWidth="1.0" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[internal Code]]></text> </staticText> </band> </pageFooter> <lastPageFooter> <band height="155" isSplitAllowed="true" > <staticText> <reportElement x="180" y="55" width="59" height="23" key="staticText-2"/> <box></box> <textElement textAlignment="Right" verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[Milan,]]></text> </staticText> <textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="180" y="77" width="57" height="23" key="textField-2"/> <box></box> <textElement> <font/> </textElement> <textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{DATA}]]></textFieldExpression> </textField> <staticText> <reportElement x="330" y="55" width="127" height="23" key="staticText-3"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[Authorized Signature:]]></text> </staticText> <image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="331" y="78" width="111" height="50" key="image-2"/> <box></box> <graphicElement stretchType="NoStretch"/> <imageExpression class="java.lang.String"><![CDATA["/findb/sw/fin/java/CreateReportCPPI/reports/firmaCottini.jpg"]]></imageExpression> </image> <staticText> <reportElement x="332" y="130" width="111" height="23" key="staticText-4"/> <box></box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[(Enrico Cottini)]]></text> </staticText> </band> </lastPageFooter> <summary> <band height="131" isSplitAllowed="true" > </band> </summary> </jasperReport> subGestorore.jxrml (first subreport): <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="classic" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="535" pageHeight="802" columnWidth="535" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="AllSectionsNoDetail" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString><![CDATA[sELECT B.NOME_GESTORE AS GESTORE, B.INDIRIZZO1, B.INDIRIZZO2, B.INDIRIZZO3, B.INDIRIZZO4, B.TELEFONO AS TELGESTORE, B.FAX AS FAXGESTORE FROM CPPI_GESTORI B WHERE B.NOME_GESTORE=PIPPO]]></queryString> <field name="GESTORE" class="java.lang.String"/> <field name="INDIRIZZO1" class="java.lang.String"/> <field name="INDIRIZZO2" class="java.lang.String"/> <field name="INDIRIZZO3" class="java.lang.String"/> <field name="INDIRIZZO4" class="java.lang.String"/> <field name="TELGESTORE" class="java.lang.String"/> <field name="FAXGESTORE" class="java.lang.String"/> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="266" isSplitAllowed="true" > <staticText> <reportElement x="23" y="0" width="162" height="23" key="numberPage"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[Number of Pages (including this):]]></text> </staticText> <staticText> <reportElement x="23" y="23" width="24" height="23" key="to"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[To:]]></text> </staticText> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="23" y="46" width="134" height="23" key="gestoreField"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{GESTORE}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > &
-
Hi, I solved the error but now I don't know how I can generate the excel file. I have subreport1, subreport2, main report. So first of all I need to fill the two subreport. And then I have to fill the main report with some datas and with the subreports. I have the class I paste before. Only that class. Actually I call the class 3 times (one time for earch report). I exepct three jrprint files instead I obtain only one jrprint file named classic.jrprint why? However than I call the class for the main report to obtain the excel file I receive this error: net.sf.jasperreports.engine.JRException: Error loading object from file : /findb/sw/fin/java/CreateReportCPPI/reports/subGestore.jrmxl Now, I don't use iReport. I used iReport only to create the jrxml file. Now I mustn't use iReport. I think that the class is wrong, how can I write the class for this report? where can I find a guide a tutorial o something else of this type? Thanks. Bye bye. Post Edited by abdujaparov at 10/23/2009 09:20
-
Hi, I'm sure the file exists! Now, before filling the main report I execute a filling of the sub report but now I receive this error: java.lang.UnsatisfiedLinkError: Native Library /sw/oracle/10.2/lib32/libocijdbc10.so already loaded in another classloader I don't know the cause of it, if I compile and fill another report composed by only the main report without the subreport all work well but with the subreport I have a lot of problem. What do I do wrong? my java class is: public class CreateReportCPPI { /** * Possibili tasks */ private static final String TASK_FILL = "fill"; private static final String TASK_XLS = "xls"; private static final String TASK_PDF = "pdf"; public static String DB_NAME; public static String DB_USERNAME; public static String DB_PASSWORD; public static String DRIVER; public static String DB_URL; /** * */ public static void main(String[] args) { if(args.length == 0) { usage(); return; } String taskName = args[0]; String fileName = args[1]; String connection = System.getProperty("findb.connection"); if (connection == null) { System.err.println("Stringa di connessione al db non specificata!"); System.exit(1); } String[] tokens = connection.split("\\/"); DB_USERNAME = tokens[0]; DB_PASSWORD = tokens[1].split("\\@")[0]; DB_NAME = tokens[1].split("\\@")[1]; DRIVER = "oracle.jdbc.OracleDriver"; DB_URL = "jdbc:oracle:oci:@"+DB_NAME; try { long start = System.currentTimeMillis(); if (TASK_FILL.equals(taskName)) { Class.forName(DRIVER); Connection conn = DriverManager.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD); System.out.println("****NOME DEL FILE RICEVUTO:" + fileName); JasperFillManager.fillReportToFile(fileName, null, conn); System.err.println("Filling time : " + (System.currentTimeMillis() - start)); } else if (TASK_XLS.equals(taskName)) { File sourceFile = new File(fileName); JasperPrint jasperPrint = (JasperPrint)JRLoader.loadObject(sourceFile); File destFile = new File(sourceFile.getParent(), jasperPrint.getName() + ".xls"); JRXlsExporter exporter = new JRXlsExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString()); exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE); exporter.exportReport(); System.err.println("XLS creation time : " + (System.currentTimeMillis() - start)); } else if (TASK_PDF.equals(taskName)) { JasperExportManager.exportReportToPdfFile(fileName); System.err.println("PDF creation time : " + (System.currentTimeMillis() - start)); } else { usage(); } } catch (JRException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } /** * Usage */ private static void usage() { System.out.println( "CreateExcelSingleSheet usage:" ); System.out.println( "\tjava CreateExcelSingleSheet task file" ); System.out.println( "\tTasks : fill | xls | pdf" ); } } I call this class 3 times one for the first subreport, one for the second subreport and the last time for the main report. I obtain the correct .jasper files. But when I call this java program for the first subreport filling I receive the errore I paste above. What do I have to do? Thanks, bye bye.
-
Hi, I compiled the jrxml subreport. Now I have in the directory /findb/sw/fin/java/CreateReportCPPI/reports the report Excel.jrxml subGestore.jrxml subFondi.jrxml and in the folder: /findb/sw/fin/java/CreateReportCPPI/build/reports the jasper files: Excel.jasper subGestore.jasper subFondi.jasper Now I try to create the excel and I receive this error: In the java file I created I receiv the error at the line 113: Why this problem? Problems with datasource? The queries returns the datas are in the jrxml files. Thanks, bye bye.
-
Hi, I have a lot of problems with jasper report. I created a report with a subreport. I succed to create the jrxml report. When I try to compile the report I receive only the Main report jasper file and not the other subreport jasper. And I don't know why. These are my files: Main report: <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="Excel" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="595" pageHeight="842" columnWidth="535" columnSpacing="0" leftMargin="30" rightMargin="30" topMargin="20" bottomMargin="20" whenNoDataType="NoPages" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString><![CDATA[sELECT TRUNC(SYSDATE) AS DATA FROM DUAL]]></queryString> <field name="DATA" class="java.sql.Timestamp"/> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="67" isSplitAllowed="true" > <image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="1" y="1" width="364" height="66" key="image-1"/> <box></box> <graphicElement stretchType="NoStretch"/> <imageExpression class="java.lang.String"><![CDATA["/findb/sw/fin/java/CreateReportCPPI/reports/logoBancaIMI.jpg"]]></imageExpression> </image> </band> </title> <pageHeader> <band height="133" isSplitAllowed="true" > <staticText> <reportElement mode="Opaque" x="111" y="0" width="424" height="33" forecolor="#000000" key="subscriptionFORM" positionType="Float"/> <box></box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" size="16" isUnderline="true"/> </textElement> <text><![CDATA[sUBSCRIPTION FORM]]></text> </staticText> <staticText> <reportElement x="1" y="1" width="109" height="32" key="from"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[From:]]></text> </staticText> <staticText> <reportElement x="1" y="33" width="135" height="23" key="bancaImiSPA"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" isBold="true"/> </textElement> <text><![CDATA[bANCA IMI SPA]]></text> </staticText> <staticText> <reportElement x="1" y="77" width="341" height="23" key="telefono1"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[TEL: #39-02.7261.5463(Enrico COTTINI) or .5446 (Paolo FOSCHIANO)]]></text> </staticText> <staticText> <reportElement x="1" y="100" width="341" height="23" key="confirmationTxt"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[PLEASE SEND CONFIRMATIONS TO: #39-02.7261.5217]]></text> </staticText> <staticText> <reportElement x="1" y="54" width="296" height="23" key="staticText-10"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" isBold="true"/> </textElement> <text><![CDATA[Piazzetta Giordano Dell'Amore, 3 - 20121 - MILANO]]></text> </staticText> </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="135" isSplitAllowed="true" > <line direction="TopDown"> <reportElement x="1" y="3" width="534" height="0" key="line-1"/> <graphicElement stretchType="NoStretch"/> </line> <subreport isUsingCache="true"> <reportElement x="1" y="5" width="534" height="126" key="subreport-1"/> <subreportExpression class="java.lang.String"><![CDATA["/findb/sw/fin/java/CreateReportCPPI/reports/subGestore.jrmxl"]]></subreportExpression> </subreport> </band> </detail> <columnFooter> <band height="30" isSplitAllowed="true" > <line direction="TopDown"> <reportElement x="1" y="1" width="534" height="0" key="line-2"/> <graphicElement stretchType="NoStretch"/> </line> </band> </columnFooter> <pageFooter> <band height="224" isSplitAllowed="true" > <staticText> <reportElement x="1" y="1" width="534" height="23" key="subscrptio2"/> <box></box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" size="12" isBold="true" isUnderline="true"/> </textElement> <text><![CDATA[sUBSCRIPTION FORM]]></text> </staticText> <subreport isUsingCache="true"> <reportElement x="1" y="104" width="534" height="78" key="subreport-2"/> <subreportExpression class="java.lang.String"><![CDATA["/findb/sw/fin/java/CreateReportCPPI/reports/subFondi.jrmxl"]]></subreportExpression> </subreport> <staticText> <reportElement x="1" y="23" width="249" height="23" key="clientDesign"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[Client designation: Banca IMI spa - Strategie Attive]]></text> </staticText> <staticText> <reportElement x="1" y="46" width="59" height="23" key="account"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[Account:]]></text> </staticText> <staticText> <reportElement x="23" y="193" width="146" height="23" key="noDelivery"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[No delivery of certificates.]]></text> </staticText> <staticText> <reportElement x="23" y="81" width="100" height="23" key="nomeFondo-1"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[Fund Name]]></text> </staticText> <staticText> <reportElement x="123" y="81" width="39" height="23" key="staticText-5"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[share class]]></text> </staticText> <staticText> <reportElement x="162" y="81" width="74" height="23" key="staticText-6"/> <box> <topPen lineWidth="1.0" lineStyle="Solid"/> <bottomPen lineWidth="1.0" lineStyle="Solid"/> <rightPen lineWidth="1.0" lineStyle="Solid"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[iSIN CODE]]></text> </staticText> <staticText> <reportElement x="236" y="81" width="55" height="23" key="staticText-7"/> <box> <pen lineWidth="0.0" lineStyle="Solid"/> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[CASH AMOUNT]]></text> </staticText> <staticText> <reportElement x="291" y="81" width="62" height="23" key="staticText-8"/> <box> <topPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[PAYMENT CURRENCY]]></text> </staticText> <staticText> <reportElement x="353" y="81" width="46" height="23" key="staticText-9"/> <box> <topPen lineWidth="1.0" lineColor="#000000"/> <bottomPen lineWidth="1.0" lineColor="#000000"/> <rightPen lineWidth="1.0" lineColor="#000000"/> </box> <textElement verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[internal Code]]></text> </staticText> </band> </pageFooter> <lastPageFooter> <band height="155" isSplitAllowed="true" > <staticText> <reportElement x="180" y="55" width="59" height="23" key="staticText-2"/> <box></box> <textElement textAlignment="Right" verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[Milan,]]></text> </staticText> <textField isStretchWithOverflow="false" isBlankWhenNull="true" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="180" y="77" width="57" height="23" key="textField-2"/> <box></box> <textElement> <font/> </textElement> <textFieldExpression class="java.sql.Timestamp"><![CDATA[$F{DATA}]]></textFieldExpression> </textField> <staticText> <reportElement x="330" y="55" width="127" height="23" key="staticText-3"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Bottom"> <font fontName="Arial"/> </textElement> <text><![CDATA[Authorized Signature:]]></text> </staticText> <image evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="331" y="78" width="111" height="50" key="image-2"/> <box></box> <graphicElement stretchType="NoStretch"/> <imageExpression class="java.lang.String"><![CDATA["/findb/sw/fin/java/CreateReportCPPI/reports/firmaCottini.jpg"]]></imageExpression> </image> <staticText> <reportElement x="332" y="130" width="111" height="23" key="staticText-4"/> <box></box> <textElement textAlignment="Center" verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[(Enrico Cottini)]]></text> </staticText> </band> </lastPageFooter> <summary> <band height="131" isSplitAllowed="true" > </band> </summary> </jasperReport> Subreport: <?xml version="1.0" encoding="UTF-8" ?> <!-- Created with iReport - A designer for JasperReports --> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="classic" columnCount="1" printOrder="Vertical" orientation="Portrait" pageWidth="535" pageHeight="802" columnWidth="535" columnSpacing="0" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" whenNoDataType="AllSectionsNoDetail" isTitleNewPage="false" isSummaryNewPage="false"> <property name="ireport.scriptlethandling" value="0" /> <property name="ireport.encoding" value="UTF-8" /> <import value="java.util.*" /> <import value="net.sf.jasperreports.engine.*" /> <import value="net.sf.jasperreports.engine.data.*" /> <queryString><![CDATA[sELECT B.NOME_GESTORE AS GESTORE, B.INDIRIZZO1, B.INDIRIZZO2, B.INDIRIZZO3, B.INDIRIZZO4, B.TELEFONO AS TELGESTORE, B.FAX AS FAXGESTORE FROM CPPI_GESTORI B WHERE B.NOME_GESTORE=PIPPO]]></queryString> <field name="GESTORE" class="java.lang.String"/> <field name="INDIRIZZO1" class="java.lang.String"/> <field name="INDIRIZZO2" class="java.lang.String"/> <field name="INDIRIZZO3" class="java.lang.String"/> <field name="INDIRIZZO4" class="java.lang.String"/> <field name="TELGESTORE" class="java.lang.String"/> <field name="FAXGESTORE" class="java.lang.String"/> <background> <band height="0" isSplitAllowed="true" > </band> </background> <title> <band height="0" isSplitAllowed="true" > </band> </title> <pageHeader> <band height="0" isSplitAllowed="true" > </band> </pageHeader> <columnHeader> <band height="0" isSplitAllowed="true" > </band> </columnHeader> <detail> <band height="266" isSplitAllowed="true" > <staticText> <reportElement x="23" y="0" width="162" height="23" key="numberPage"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[Number of Pages (including this):]]></text> </staticText> <staticText> <reportElement x="23" y="23" width="24" height="23" key="to"/> <box></box> <textElement verticalAlignment="Middle"> <font fontName="Arial"/> </textElement> <text><![CDATA[To:]]></text> </staticText> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="23" y="46" width="134" height="23" key="gestoreField"/> <box></box> <textElement textAlignment="Left" verticalAlignment="Middle"> <font fontName="Arial" pdfFontName="Helvetica-Bold" size="11" isBold="true"/> </textElement> <textFieldExpression class="java.lang.String"><![CDATA[$F{GESTORE}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" isBlankWhenNull="false" evaluationTime="Now" hyperlinkType="None" hyperlinkTarget="Self" > <reportElement x="23" y="69" wi
-
Hi, I have some problems with the relative path of an image and subreports. I receive this error when I try to execute jasperreport: [java] net.sf.jasperreports.engine.JRException: Byte data not found at location : .\logoBancaIMI.jpg The location of the jpg file is in relation with the position with the jrxml file. When I compile the jrxml and I obtain the .jasper file, this last is saved in another folder and I receive the errore mentioned before. How can I correct this problem? Is the absolute path the only solution? I've the same problem with paths of two subreport. Thanks, bye bye.
-
Hi, this message is generated by iReport when I try to execute the report. So how can I tell iReport to use the .jasper files? Thanks, bye bye.
-
Hi, I tried to create a report. iReport don't highlight any error but when I try to compile I receive this error: Error loading object from URL : file:/C:/Documents and Settings/a.mulone/My Documents/CPPI/report/.%5csubGestore.jrmxl net.sf.jasperreports.engine.JRException: Error loading object from URL : file:/C:/Documents and Settings/a.mulone/My Documents/CPPI/report/.%5csubGestore.jrmxl at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:145) at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:264) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:310) at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:259) at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275) at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:426) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1380) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:692) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:879) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:782) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234) at it.businesslogic.ireport.IReportCompiler.run(IReportCompiler.java:947) at java.lang.Thread.run(Unknown Source) Caused by: java.io.StreamCorruptedException: invalid stream header: 3C3F786D at java.io.ObjectInputStream.readStreamHeader(Unknown Source) at java.io.ObjectInputStream.<init>(Unknown Source) at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:140) ... 16 more The report is composed by two subreport. If I try to compile a subreport alone all works. When I try to compile the master report I receive this error. The main report uses a query. The two subreports use every one own different query. What could error be? Thanks, bye bye.
-
Hi, I need to create a table with iReport. I have to pass a query and then I would wirte the column name and then the row. I found, in iReport, the crosstab. But I need only the column name and nothing else. My query is: SELECT C.NAME, B.ISIN, B.NEW_ALLOCATION, '' AS CURR_PAY, '' AS INTERNAL_CODE FROM CPPI_ELAB_COMPONENTS_VALUES B, CPPI_FUNDS C WHERE B.ISIN=C.ISIN AND B.ID_PROCESS=:ID Where :ID is a variable. How can I do this? This table must be inserted in a subreport. I looked for something similar in the examples but I didn't understand anything and I think that there isn't something of this type. Could someone help me? Thanks, bye bye.
-
Mmmm but at this point passing the parameter is the easiest solution..... but I do not konw the problem. Thanks, bye bye.
-
Hi, Yes I know, but Can I create a loop for? Can I insert an if statemente? These are the problems. I am able to get the set, but I don't know If I can create a loop on the set and then use an if statemente on each element of the set (taken with the loop). Thanks, bye bye.
-
Mmmm, Another way to go over the problem. The datasource I pass to the subreport contains only one object of this class EConfiguration. So this class contains a set of another object, ECurrenciesDiffMin. The last object contain the fields a string and a number. The parameter I am not able to pass the subreport is the number of one of the object ECurrenciesDiffMin I have in the set contained in the EConfiguration (the datasource). So does It exist a method to check the set to get the correct object ECurrenciesDiffMin from the set contained in EConfiguration? Because if I can check the set and get the correct object ECurrenciesDiffMin I do not need the parameter. Thanks bye bye.
-
Hi, in the subreport I have this: whenNoDataType="NoPages" In the datasource I have only one element. But the datasource is not empty. How can I do? I need to generate reports runtime. Thanks bye bye.