Jump to content

bamabi45320

Members
  • Posts

    3
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Everything posted by bamabi45320

  1. Hi, First, I have a report in Jaspersoft Studio which is fill with json data. The JRXML : <?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 --><!-- 2016-01-20T15:40:26 --><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="Appreciation" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" whenResourceMissingType="Empty" uuid="0b6679e8-cc7a-46e7-bbaf-1da414c8fb1b"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="NEW_DATAADAPTER.xml"/> <style name="Table 1_TH" mode="Opaque" backcolor="#F0F8FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Table 1_CH" mode="Opaque" backcolor="#BFE1FF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <style name="Table 1_TD" mode="Opaque" backcolor="#FFFFFF"> <box> <pen lineWidth="0.5" lineColor="#000000"/> <topPen lineWidth="0.5" lineColor="#000000"/> <leftPen lineWidth="0.5" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineColor="#000000"/> <rightPen lineWidth="0.5" lineColor="#000000"/> </box> </style> <subDataset name="Dataset1" uuid="ce13b324-3856-4305-82ef-b9f536cfe078"> <property name="com.jaspersoft.studio.data.defaultdataadapter" value="NEW_DATAADAPTER.xml"/> <queryString language="json"> <![CDATA]> </queryString> <field name="crpPromo" class="java.lang.String"> <fieldDescription> <![CDATA[crpPromo]]> </fieldDescription> </field> <field name="datePromo" class="java.lang.String"> <fieldDescription> <![CDATA[datePromo]]> </fieldDescription> </field> <field name="modePromo" class="java.lang.String"> <fieldDescription> <![CDATA[modePromo]]> </fieldDescription> </field> <group name="crpPromo"> <groupExpression> <![CDATA[$F{crpPromo}]]> </groupExpression> </group> <group name="datePromo"> <groupExpression> <![CDATA[$F{datePromo}]]> </groupExpression> </group> <group name="modePromo"> <groupExpression> <![CDATA[$F{modePromo}]]> </groupExpression> </group> </subDataset> <queryString language="JSON"> <![CDATA]> </queryString> <field name="nom1" class="java.lang.String"> <fieldDescription> <![CDATA[nom1]]> </fieldDescription> </field> <field name="prenom1" class="java.lang.String"> <fieldDescription> <![CDATA[prenom1]]> </fieldDescription> </field> <field name="dateNaissance1" class="java.lang.String"> <fieldDescription> <![CDATA[dateNaissance1]]> </fieldDescription> </field> <field name="matricule" class="java.lang.String"> <fieldDescription> <![CDATA[matricule]]> </fieldDescription> </field> <field name="corps" class="java.lang.String"> <fieldDescription> <![CDATA[corps]]> </fieldDescription> </field> <field name="grade" class="java.lang.String"> <fieldDescription> <![CDATA[grade]]> </fieldDescription> </field> <field name="ech" class="java.lang.String"> <fieldDescription> <![CDATA[ech]]> </fieldDescription> </field> <group name="Groupe1" isStartNewPage="true" isResetPageNumber="true" isReprintHeaderOnEachPage="true"> <groupExpression> <![CDATA[$F{matricule}]]> </groupExpression> <groupHeader> <band height="250"> <staticText> <reportElement x="0" y="15" width="200" height="35" forecolor="#F54927" uuid="7cab88d7-62e9-4bd0-831a-2808cd6411eb"/> <box> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement> <font size="15"/> </textElement> <text> <![CDATA[Dossier d'appréciation 2013]]> </text> </staticText> <frame> <reportElement x="8" y="70" width="539" height="180" uuid="a5e959ea-6f13-4781-b990-a62e8fb04ae9"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <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"/> <rightPen lineWidth="1.0" lineStyle="Solid" lineColor="#000000"/> </box> <textField> <reportElement x="272" y="160" width="264" height="18" uuid="17594476-7ec8-4ce4-a959-b896d86a6aa7"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{ech}]]> </textFieldExpression> </textField> <textField> <reportElement x="272" y="142" width="265" height="18" uuid="eaa5e8d4-c988-42f7-9ab0-e364c87cccab"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{grade}]]> </textFieldExpression> </textField> <textField> <reportElement x="272" y="124" width="265" height="18" uuid="f8fd76fc-a4b6-448d-a186-aa67b71b003e"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{corps}]]> </textFieldExpression> </textField> <staticText> <reportElement x="2" y="124" width="270" height="18" forecolor="#2F63DE" uuid="3e9c827e-6d19-4964-a6e7-43d50b2268c4"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text> <![CDATA[Corps :]]> </text> </staticText> <staticText> <reportElement x="2" y="142" width="270" height="18" forecolor="#2F63DE" uuid="096c7886-88cb-4bc6-b246-0b79d563de28"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text> <![CDATA[Grade :]]> </text> </staticText> <staticText> <reportElement x="2" y="160" width="270" height="18" forecolor="#2F63DE" uuid="718346be-aad3-4769-b233-37c97512fa75"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text> <![CDATA[Echelon :]]> </text> </staticText> <staticText> <reportElement mode="Opaque" x="2" y="3" width="535" height="20" forecolor="#F54927" backcolor="#C5C9C9" uuid="7ca69dd5-881f-4d12-a233-a4e025aeac7f"> <property name="com.jaspersoft.studio.unit.x" value="pixel"/> </reportElement> <box leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text> <![CDATA[Proposé à l'avancement]]> </text> </staticText> <staticText> <reportElement x="2" y="23" width="270" height="18" forecolor="#2F63DE" uuid="ffe0ce07-a04d-4799-bbab-b449553fc263"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12" isBold="true"/> </textElement> <text> <![CDATA[Nom d'usage :]]> </text> </staticText> <staticText> <reportElement x="2" y="41" width="270" height="18" forecolor="#2F63DE" uuid="e5976d5a-6f10-42b6-9560-7ec11ac3fedc"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12" isBold="true"/> </textElement> <text> <![CDATA[Prénom :]]> </text> </staticText> <staticText> <reportElement x="2" y="59" width="270" height="18" forecolor="#2F63DE" uuid="8aa2b1ec-372d-447e-9fd6-4094dc438483"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text> <![CDATA[Nom de famille :]]> </text> </staticText> <textField> <reportElement x="272" y="59" width="265" height="18" uuid="20e4e77c-d294-4017-aa03-368288ab7de3"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{nom1}]]> </textFieldExpression> </textField> <textField> <reportElement x="272" y="41" width="265" height="18" uuid="22a5d3b0-1ad2-4ec1-8c38-81a2edd8a545"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{prenom1}]]> </textFieldExpression> </textField> <textField> <reportElement x="272" y="23" width="265" height="18" uuid="da483180-115d-4302-bb84-4b85c4930737"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{nom1}]]> </textFieldExpression> </textField> <staticText> <reportElement x="2" y="77" width="270" height="18" forecolor="#2F63DE" uuid="449f9adc-1851-4637-91f0-46f918ebabab"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text> <![CDATA[Date de naissance :]]> </text> </staticText> <textField> <reportElement x="272" y="77" width="265" height="18" uuid="79407234-3b50-4329-adfd-96ada5cf338c"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.5" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{dateNaissance1}]]> </textFieldExpression> </textField> <textField> <reportElement x="272" y="95" width="264" height="18" uuid="ee1d1c8d-ebdb-467e-a81a-2d304d59cb68"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{matricule}]]> </textFieldExpression> </textField> <staticText> <reportElement x="2" y="95" width="270" height="18" forecolor="#2F63DE" uuid="882b1bb7-c46c-455a-a930-cee75b7a71d5"/> <box topPadding="1" leftPadding="5"> <topPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <leftPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <bottomPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> <rightPen lineWidth="0.0" lineStyle="Solid" lineColor="#000000"/> </box> <textElement verticalAlignment="Middle"> <font size="12"/> </textElement> <text> <![CDATA[Matricule]]> </text> </staticText> <line> <reportElement x="10" y="118" width="520" height="1" forecolor="#2F63DE" uuid="01e8becb-0219-4275-a209-62b26c067f55"> <property name="com.jaspersoft.studio.unit.width" value="pixel"/> <property name="com.jaspersoft.studio.unit.x" value="pixel"/> </reportElement> </line> </frame> </band> </groupHeader> </group> <background> <band splitType="Stretch"/> </background> <detail> <band height="18" splitType="Stretch"> <componentElement> <reportElement x="10" y="0" width="537" height="18" uuid="65053ddc-606f-4bbf-a62c-0a20bef5641f"> <property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/> <property name="com.jaspersoft.studio.unit.height" value="pixel"/> </reportElement> <jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"> <datasetRun subDataset="Dataset1" uuid="6b686496-6540-4aa5-b078-2ab3c570c6af"> <dataSourceExpression> <![CDATA[((net.sf.jasperreports.engine.data.JsonDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("")]]> </dataSourceExpression> </datasetRun> <jr:column width="178" uuid="c72b858b-8b01-4812-b10f-b8d97404b788"> <jr:detailCell style="Table 1_TD" height="18"> <textField> <reportElement x="0" y="0" width="178" height="18" uuid="7ed85ae4-2da1-415d-b34a-72e91fa1a301"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{crpPromo}]]> </textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="178" uuid="fa54b4c8-59f1-4e7c-9b66-1517ae5a4ced"> <jr:detailCell style="Table 1_TD" height="18"> <textField> <reportElement x="0" y="0" width="178" height="18" uuid="f8a894c5-930f-493b-8587-15640fb36934"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{datePromo}]]> </textFieldExpression> </textField> </jr:detailCell> </jr:column> <jr:column width="178" uuid="be2cb39b-9719-4678-bdc3-26b3c198835a"> <jr:detailCell style="Table 1_TD" height="18"> <textField> <reportElement x="0" y="0" width="178" height="18" uuid="3a1f0d06-c458-49a9-b186-301201301286"/> <textElement textAlignment="Center" verticalAlignment="Middle"/> <textFieldExpression> <![CDATA[$F{modePromo}]]> </textFieldExpression> </textField> </jr:detailCell> </jr:column> </jr:table> </componentElement> </band> </detail></jasperReport>[/code]The JSON datas : { "list": [ { "matricule": 123456789, "dateNaissance1": 315529200000, "modePromo": "Concour ext.", "ech": 4, "prenom1": "PrenomAgent", "corps": "Ingénieur de recherche", "nom1": "NomAgent", "grade": "1e classe", "datePromo": 1451602800000, "crpPromo": "IR1", }, { "matricule": 251413, "dateNaissance1": 631148400000, "modePromo": "Concour int.", "ech": 2, "prenom1": "Jean", "corps": "Techniciens de maintenance", "nom1": "Torres", "grade": "2e classe", "datePromo": 1451602800000, "crpPromo": "TM2", } ]} It works perfectly on studio but when a try to use thoses files in my java application, i have just one page and all the fields are null. JAVA :public JasperPrint preparePrinter(final InputStream pDatas, final InputStream pReport) { JasperDesign jasperDesign = null; JasperReport jasperReport = null; JasperPrint jasperPrint = null; try { jasperDesign = JRXmlLoader.load(pReport); jasperReport = JasperCompileManager.compileReport(jasperDesign); final JsonDataSource app = new JsonDataSource(pDatas); // La map peut être utilisée pour passer des paramètres au rapport jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap<String, Object>(), app); } catch (final JRException e) { _logger.debug("Erreur lors de la génération du rapport" + e.getLocalizedMessage()); } return jasperPrint; }I don't know where is the mistake, or if I need specifics .jar to make it works ... Thanks for te response, regards Alban
  2. Hi, I'm working on Jaspersoft Studio and I want to know how can I print multiple reports using one jrxml and an XML file. For example, I have this XML: <?xml version="1.0" encoding="UTF-8"?><items><item><name>Torres</name><certificate><certificate_name>BAC</certificate_name><certificate_year>2000</certificate_year></certificate><certificate><certificate_name>BTS</certificate_name><certificate_year>2012</certificate_year></certificate> </item><item><name>Crane</name><certificate><certificate_name>CAP</certificate_name><certificate_year>2012</certificate_year></certificate> <certificate><certificate_name>BEP</certificate_name><certificate_year>2013</certificate_year></certificate> </item></items> And this report :[/code]<?xml version="1.0" encoding="UTF-8"?><!-- Created with Jaspersoft Studio version 6.2.0.final using JasperReports Library version 6.2.0 --><!-- 2016-01-15T11:00:36 --><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="Blank_A4" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="5c659b5e-0aa2-418b-ba5d-6ffd6f69c888"><property name="net.sf.jasperreports.data.adapter" value="XmlAdapter.xml"/><style name="Table_TH" mode="Opaque" backcolor="#F0F8FF"><box><pen lineWidth="0.5" lineColor="#000000"/><topPen lineWidth="0.5" lineColor="#000000"/><leftPen lineWidth="0.5" lineColor="#000000"/><bottomPen lineWidth="0.5" lineColor="#000000"/><rightPen lineWidth="0.5" lineColor="#000000"/></box></style><style name="Table 1_TH" mode="Opaque" backcolor="#F0F8FF"><box><pen lineWidth="0.5" lineColor="#000000"/><topPen lineWidth="0.5" lineColor="#000000"/><leftPen lineWidth="0.5" lineColor="#000000"/><bottomPen lineWidth="0.5" lineColor="#000000"/><rightPen lineWidth="0.5" lineColor="#000000"/></box></style><style name="Table 2_TH" mode="Opaque" backcolor="#F0F8FF"><box><pen lineWidth="0.5" lineColor="#000000"/><topPen lineWidth="0.5" lineColor="#000000"/><leftPen lineWidth="0.5" lineColor="#000000"/><bottomPen lineWidth="0.5" lineColor="#000000"/><rightPen lineWidth="0.5" lineColor="#000000"/></box></style><style name="Table 2_CH" mode="Opaque" backcolor="#BFE1FF"><box><pen lineWidth="0.5" lineColor="#000000"/><topPen lineWidth="0.5" lineColor="#000000"/><leftPen lineWidth="0.5" lineColor="#000000"/><bottomPen lineWidth="0.5" lineColor="#000000"/><rightPen lineWidth="0.5" lineColor="#000000"/></box></style><style name="Table 2_TD" mode="Opaque" backcolor="#FFFFFF"><box><pen lineWidth="0.5" lineColor="#000000"/><topPen lineWidth="0.5" lineColor="#000000"/><leftPen lineWidth="0.5" lineColor="#000000"/><bottomPen lineWidth="0.5" lineColor="#000000"/><rightPen lineWidth="0.5" lineColor="#000000"/></box></style><subDataset name="DataSetTable" uuid="8b03db47-9f29-4097-880b-0605d2e14cb3"><property name="com.jaspersoft.studio.data.defaultdataadapter" value="XmlAdapter.xml"/><queryString language="XPath"><![CDATA[/items/item/certificate]]></queryString><field name="certificate_year" class="java.lang.String"><fieldDescription><![CDATA[certificate_year]]></fieldDescription></field><field name="certificate_name" class="java.lang.String"><fieldDescription><![CDATA[certificate_name]]></fieldDescription></field></subDataset><queryString language="XPath"><![CDATA[/items/item]]></queryString><field name="name" class="java.lang.String"><fieldDescription><![CDATA[name]]></fieldDescription></field><title><band height="103" splitType="Stretch"><staticText><reportElement x="0" y="0" width="555" height="79" uuid="ac9f0b4b-8168-42ab-b980-d2d3a2bc3059"/><textElement textAlignment="Center" verticalAlignment="Middle"><font size="42"/></textElement><text><![CDATA[Personnal report]]></text></staticText></band></title><detail><band height="312"><textField><reportElement x="110" y="1" width="100" height="30" uuid="4c72a837-8fc3-4255-b4f0-b0fb8548e57d"/><textFieldExpression><![CDATA[$F{name}]]></textFieldExpression></textField><staticText><reportElement x="10" y="1" width="100" height="30" uuid="286d8d1b-ee2e-412e-84bf-cf1d2483aaa3"/><text><![CDATA[name]]></text></staticText><componentElement><reportElement x="10" y="31" width="200" height="119" uuid="c9befb07-30a9-425b-b873-14e1c2f36e8a"><property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.VerticalRowLayout"/></reportElement><jr:table xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd"><datasetRun subDataset="DataSetTable" uuid="f48ca1cf-6217-4734-9c45-4464993f3d7a"><dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/item/certificate")]]></dataSourceExpression></datasetRun><jr:column width="100" uuid="d1ffa2e8-1c9c-4d5d-81f2-3eff4ef110b0"><property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonne1"/><jr:columnHeader style="Table 2_CH" height="30"><staticText><reportElement x="0" y="0" width="100" height="30" uuid="9a8fe1a3-6b23-418a-bc8c-b7db78fd1db8"/><text><![CDATA[certificate_name]]></text></staticText></jr:columnHeader><jr:detailCell style="Table 2_TD" height="30"><textField><reportElement x="0" y="0" width="100" height="30" uuid="f2a86c0d-5b1d-4195-ac79-3a18d026bdad"/><textFieldExpression><![CDATA[$F{certificate_name}]]></textFieldExpression></textField></jr:detailCell></jr:column><jr:column width="100" uuid="06bd8366-bf8c-4f76-a302-d1dad72a4f04"><property name="com.jaspersoft.studio.components.table.model.column.name" value="Colonne2"/><jr:columnHeader style="Table 2_CH" height="30"><staticText><reportElement x="0" y="0" width="100" height="30" uuid="9dcccd71-3a9a-410e-b8c5-94755c77ff54"/><text><![CDATA[certificate_year]]></text></staticText></jr:columnHeader><jr:detailCell style="Table 2_TD" height="30"><textField><reportElement x="0" y="0" width="100" height="30" uuid="cd49394e-161d-48b5-b99a-5042768f3cbe"/><textFieldExpression><![CDATA[$F{certificate_year}]]></textFieldExpression></textField></jr:detailCell></jr:column></jr:table></componentElement></band></detail></jasperReport> This return a report with the description of the two items.But I want to create a new report (with the title, etc) for each "item" of my XML file. Regards,Alban
×
×
  • Create New...