Hello I create two carry one main and the other subreport with jasper 5.5. when I execute my hand report I have both reporting that is on the same page but if I had a code for example php, I just the hand report that appears by the subreport
here is my sample 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="bordereaux" language="groovy" pageWidth="612" pageHeight="792" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="9e529912-204c-4d15-aeb0-93b737013f8b"> <property name="ireport.zoom" value="1.5"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <style name="Crosstab Data Text" hAlign="Center"/> <style name="table"> <box><pen lineWidth="1.0" lineColor="#000000"/> </box> </style> <style name="table_TH" mode="Opaque" backcolor="#F0F8FF"> <box><pen lineWidth="0.5" lineColor="#000000"/></box> </style> <style name="table_CH" mode="Opaque" backcolor="#BFE1FF"> <box><pen lineWidth="0.5" lineColor="#000000"/></box> </style> <style name="table_TD" mode="Opaque" backcolor="#FFFFFF"> <box><pen lineWidth="0.5" lineColor="#000000"/></box> </style> <subDataset name="listtecolis" uuid="36c34738-c752-4fdc-9d91-649a6c51ee37"> <parameter name="CODE_BORDEREAU" class="java.lang.String"/> <queryString language="SQL"> <![CDATA[SELECT code_colis, nature, nom_expediteur, nom_destinataire, colis.etat, type_payement FROM bordereaux_colis, colis, bordereaux, agences, vehicules WHERE bordereaux.id = bordereaux_colis.bordereaux_id AND bordereaux_colis.coli_id = colis.id AND colis.etat >= 1 AND bordereaux.agence_id = agences.id AND colis.agence_id = agences.id AND bordereaux.vehicule_id = vehicules.id AND bordereaux.num_bordereau = $P{CODE_BORDEREAU} ORDER BY colis.created]]> </queryString> <field name="code_colis" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="nature" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="nom_expediteur" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="nom_destinataire" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="etat" class="java.lang.Integer"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="type_payement" class="java.lang.String"> <fieldDescription><![CDATA[]]></fieldDescription> </field> </subDataset> <parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false"> <defaultValueExpression> <![CDATA["./"]]> </defaultValueExpression> </parameter> <parameter name="CODE_BORDEREAU" class="java.lang.String"> <defaultValueExpression> <![CDATA[]]> </defaultValueExpression> </parameter> <queryString> <![CDATA[ SELECT bordereaux.`num_bordereau` AS bordereaux_num_bordereau, bordereaux.`date_envoie` AS bordereaux_date_envoie, bordereaux.`agence_id` AS bordereaux_agence_id, bordereaux.`created` AS bordereaux_created, bordereaux.`id` AS bordereaux_id, bordereaux.`agent_operation` AS bordereaux_agent_operation, bordereaux.`convoyeur` AS bordereaux_convoyeur, bordereaux.`agence_operation` AS bordereaux_agence_operation, bordereaux.`chef_agence` AS bordereaux_chef_agence, vehicules.`id` AS vehicules_id, vehicules.`matricule` AS vehicules_matricule, vehicules.`type` AS vehicules_type, vehicules.`capacite` AS vehicules_capacite, bordereaux.`vehicule_id` AS bordereaux_vehicule_id, agences.`id` AS agences_id, agences.`nom_agence` AS agences_nom_agence, agences.`ville` AS agences_ville, agences.`created` AS agences_created, agences.`phone` AS agences_phone, users.`id` AS users_id, users.`nom` AS users_nom, users.`prenom` AS users_prenom, bordereaux.`entreprise` AS bordereaux_entreprise FROM `vehicules` vehicules INNER JOIN `bordereaux` bordereaux ON vehicules.`id` = bordereaux.`vehicule_id` INNER JOIN `agences` agences ON bordereaux.`agence_id` = agences.`id` INNER JOIN `users` users . ON bordereaux.`user_id` = users.`id` AND agences.`id` = users.`agence_id` WHERE num_bordereau = '$P{CODE_BORDEREAU}' ]]> </queryString> <field name="bordereaux_num_bordereau" class="java.lang.String"/> <field name="bordereaux_date_envoie" class="java.sql.Timestamp"/> <field name="bordereaux_agence_id" class="java.lang.Integer"/> <field name="bordereaux_created" class="java.sql.Timestamp"/> <field name="bordereaux_id" class="java.lang.Integer"/> <field name="bordereaux_agent_operation" class="java.lang.Integer"/> <field name="bordereaux_convoyeur" class="java.lang.Integer"/> <field name="bordereaux_agence_operation" class="java.lang.Integer"/> <field name="bordereaux_chef_agence" class="java.lang.String"/> <field name="vehicules_id" class="java.lang.Integer"/> <field name="vehicules_matricule" class="java.lang.String"/> <field name="vehicules_type" class="java.lang.String"/> <field name="vehicules_capacite" class="java.lang.Integer"/> <field name="bordereaux_vehicule_id" class="java.lang.Integer"/> <field name="agences_id" class="java.lang.Integer"/> <field name="agences_nom_agence" class="java.lang.String"/> <field name="agences_ville" class="java.lang.String"/> <field name="agences_created" class="java.sql.Timestamp"/> <field name="agences_phone" class="java.lang.String"/> <field name="users_id" class="java.lang.Integer"/> <field name="users_nom" class="java.lang.String"/> <field name="users_prenom" class="java.lang.String"/> <field name="bordereaux_entreprise" class="java.lang.String"/> <variable name="bordereaux_agence_operation_1" class="java.lang.Integer" calculation="Lowest"> <variableExpression> <![CDATA[$F{bordereaux_agence_operation}]]> </variableExpression> </variable> <variable name="TOTAL_ITEM_RECORD" class="java.lang.Integer"> <variableExpression><![CDATA[]]></variableExpression> <initialValueExpression><![CDATA[0]]></initialValueExpression> </variable> <background> <band splitType="Stretch"/> </background> <title> <band height="103" splitType="Stretch"> <staticText> <reportElement x="0" y="16" width="46" height="12" uuid="403d1c2d-c551-4ba1-8893-4e4fc1b5481e"/> <textElement> <font size="7" isBold="true"/> </textElement> <text><![CDATA[Agence de:]]></text> </staticText> <textField> <reportElement x="46" y="16" width="78" height="12" uuid="461f1806-e306-477b-967a-a1be63e10236"/> <textElement> <font size="7" isBold="true"/> </textElement> <textFieldExpression> <![CDATA[$F{bordereaux_agence_operation}]]> </textFieldExpression> </textField> <image> <reportElement x="250" y="3" width="41" height="24" uuid="77cb83bd-63e4-428a-b397-63ecded63c5d"/> <imageExpression><![CDATA["./colis.jpg"]]></imageExpression> </image> <staticText> <reportElement x="142" y="33" width="283" height="12" uuid="01f776ec-3df6-4f5f-aafe-54c4708fc875"/> <textElement textAlignment="Center"> <font size="8" isBold="true"/> </textElement> <text><![CDATA[BORDEREAU DE TRANSMISSION DE COLIS]]></text> </staticText> <staticText> <reportElement x="249" y="49" width="100" height="12" uuid="50c37f85-5efa-4399-8185-c2cac31bd68a"/> <textElement> <font size="7"/> </textElement> <text><![CDATA[Fiche N.................]]></text> </staticText> <line> <reportElement x="1" y="62" width="575" height="1" uuid="b45fa976-0ad3-4ca7-bcfd-6e40a632328a"/> <graphicElement> <pen lineWidth="0.25"/> </graphicElement> </line> <staticText> <reportElement x="12" y="71" width="80" height="12" uuid="0d71b8af-ca01-4bcf-8f9d-0636c5c55a8e"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> <text><![CDATA[N bordereaux:]]></text> </staticText> <textField> <reportElement x="92" y="71" width="100" height="12" uuid="0e49985c-cfa1-4de4-9a38-3bcc5afac0ea"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8" isBold="true" isStrikeThrough="false"/> <paragraph leftIndent="2"/> </textElement> <textFieldExpression> <![CDATA[$F{bordereaux_num_bordereau}]]> </textFieldExpression> </textField> <staticText> <reportElement x="192" y="71" width="80" height="12" uuid="57445dde-eb7e-4f37-9989-5498bf3606af"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> <text><![CDATA[Date envoie:]]></text> </staticText> <textField> <reportElement x="272" y="71" width="100" height="12" uuid="ef6622f9-feea-494c-8804-a2befaa4af67"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8" isBold="true" isStrikeThrough="false"/> <paragraph leftIndent="2"/> </textElement> <textFieldExpression> <![CDATA[$F{bordereaux_date_envoie}]]> </textFieldExpression> </textField> <staticText> <reportElement x="372" y="71" width="80" height="12" uuid="2a73838f-d5f7-4f34-ad3f-b41db2de0d9e"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> <text><![CDATA[Vehicule:]]></text> </staticText> <textField> <reportElement x="452" y="71" width="100" height="12" uuid="29e69d88-abd2-4127-9ddc-a1273b846120"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8" isBold="true" isStrikeThrough="false"/> <paragraph leftIndent="2"/> </textElement> <textFieldExpression> <![CDATA[$F{vehicules_matricule} + "(" + $F{vehicules_type} + ")"]]> </textFieldExpression> </textField> <staticText> <reportElement x="12" y="83" width="80" height="12" uuid="c0ced52b-ef19-4b6d-82e8-3d08b15ec7ce"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> <text><![CDATA[Destination:]]></text> </staticText> <textField> <reportElement x="92" y="83" width="100" height="12" uuid="681bd87a-b0fc-497e-ab9e-6f900e690b0a"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8" isBold="true" isStrikeThrough="false"/> <paragraph leftIndent="2"/> </textElement> <textFieldExpression> <![CDATA[$F{agences_nom_agence}]]> </textFieldExpression> </textField> <staticText> <reportElement x="192" y="83" width="80" height="12" uuid="cd6215ff-01a6-4a5f-9c20-38b5789c3643"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> <text><![CDATA[Chauffeur:]]></text> </staticText> <textField> <reportElement x="272" y="83" width="100" height="12" uuid="0a66ee07-2c20-431a-a596-a3d6ce2dfc6c"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8" isBold="true" isStrikeThrough="false"/> <paragraph leftIndent="2"/> </textElement> <textFieldExpression> <![CDATA[$F{users_nom} + " - " + $F{users_prenom}]]> </textFieldExpression> </textField> <staticText> <reportElement x="372" y="83" width="80" height="12" uuid="ecc8decc-f714-431d-b871-4e152e090f2a"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8"/> <paragraph leftIndent="2"/> </textElement> <text><![CDATA[Convoyeur:]]></text> </staticText> <textField> <reportElement x="452" y="83" width="100" height="12" uuid="b3b8f5d5-529e-4419-a32c-598329759bbf"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <bottomPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement verticalAlignment="Middle"> <font size="8" isBold="true" isStrikeThrough="false"/> <paragraph leftIndent="2"/> </textElement> <textFieldExpression> <![CDATA["Absent"]]> </textFieldExpression> </textField> <staticText> <reportElement x="1" y="29" width="45" height="12" uuid="5f0b128f-f8e6-4fcc-93c0-45fe977ad85c"/> <textElement> <font size="8"/> </textElement> <text><![CDATA[R C:]]></text> </staticText> <textField> <reportElement x="46" y="29" width="78" height="12" uuid="e84bf7fd-1e87-4b26-ba7d-7f82ad425781"/> <textElement> <font size="7" isBold="true"/> </textElement> <textFieldExpression> <![CDATA[$F{bordereaux_entreprise}]]> </textFieldExpression> </textField> <textField> <reportElement x="1" y="0" width="123" height="12" uuid="4511b5b4-da9e-47f8-a8f9-7a8eb74436cb"/> <textElement> <font size="7" isBold="true"/> </textElement> <textFieldExpression> <![CDATA[$F{bordereaux_entreprise}]]> </textFieldExpression> </textField> </band> </title> <detail> <band height="84" splitType="Stretch"> <subreport> <reportElement x="0" y="0" width="572" height="69" uuid="129e2874-14b8-4ae0-84b4-6d3115e2dc76"/> <subreportParameter name="SUBREPORT_DIR"> <subreportParameterExpression> <![CDATA[$P{SUBREPORT_DIR}]]> </subreportParameterExpression> </subreportParameter> <subreportParameter name="CODE_BORDEREAU"> <subreportParameterExpression> <![CDATA[$P{CODE_BORDEREAU}]]> </subreportParameterExpression> </subreportParameter> <connectionExpression> <![CDATA[$P{REPORT_CONNECTION}]]> </connectionExpression> <returnValue subreportVariable="REPORT_COUNT" toVariable="TOTAL_ITEM_RECORD"/> <subreportExpression> <![CDATA[$P{SUBREPORT_DIR} + "colis_bordereau.jasper"]]> </subreportExpression> </subreport> </band> </detail> <columnFooter> <band height="50"> <staticText> <reportElement x="89" y="25" width="130" height="12" uuid="ebcd59c4-d983-4b7f-b247-5a0499aa9da3"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font size="8" isBold="true"/> </textElement> <text><![CDATA[Visa de l'agent:]]></text> </staticText> <staticText> <reportElement x="219" y="25" width="130" height="12" uuid="233f5f27-5e2e-4fd7-a9d5-929321c00568"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font size="8" isBold="true"/> </textElement> <text><![CDATA[Visa du chef d'agent:]]></text> </staticText> <staticText> <reportElement x="349" y="25" width="130" height="12" uuid="e97fa632-54ae-4fb7-95a6-4a1081020678"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font size="8" isBold="true"/> </textElement> <text><![CDATA[Visa du chauffeur:]]></text> </staticText> <textField> <reportElement x="89" y="36" width="130" height="12" uuid="0122c3eb-30f8-4ecd-9784-80ad08069324"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font size="8"/> </textElement> <textFieldExpression> <![CDATA[$F{bordereaux_agent_operation}]]> </textFieldExpression> </textField> <textField> <reportElement x="219" y="36" width="130" height="12" uuid="46f92717-cce0-430c-8ff3-35b99281b085"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font size="8"/> </textElement> <textFieldExpression><![CDATA[""]]></textFieldExpression> </textField> <textField> <reportElement x="349" y="36" width="130" height="12" uuid="fcd2c10b-378b-427d-a69b-d0667dd8af9f"/> <box> <topPen lineWidth="0.25"/> <leftPen lineWidth="0.25"/> <rightPen lineWidth="0.25"/> </box> <textElement textAlignment="Center"> <font size="8"/> </textElement> <textFieldExpression> <![CDATA[$F{users_nom} + " - " + $F{users_prenom}]]> </textFieldExpression> </textField> <staticText> <reportElement x="92" y="5" width="73" height="12" uuid="13aba2a4-894d-4c10-b7cd-b3b631059941"/> <textElement> <font size="8"/> </textElement> <text><![CDATA[Nombre de colis :]]></text> </staticText> <textField> <reportElement x="165" y="5" width="57" height="12" uuid="26ae211c-13f9-4fa6-a7b9-e065dd1d32e1"/> <textElement> <font size="8" isBold="true"/> </textElement> <textFieldExpression> <![CDATA[$V{TOTAL_ITEM_RECORD}]]> </textFieldExpression> </textField> </band> </columnFooter> </jasperReport>
0 Answers:
No answers yet
no user has the error?