2015-09-16 5 views
1

Я проверил так много ссылок на ссылки из Интернета, чтобы реализовать отчет о яшме в OpenERP 7.0, но я не нашел никаких вещей для печатных повторяющихся строк для этот отчет.iReport designer 4.0.2 не работает с «напечатанным повторным значением» для строки заказа на продажу

Я хочу распечатать строку заказа на продажу как повторяющееся значение в моем отчете о заказе на поставку через инструменты отчетности jasper (iReport 4.0.2).

В моем отчете я напечатал только одну строчку строки заказа на продажу. мой вопрос в том, как я могу распечатать несколько строк заказа на продажу с помощью инструментов отчета Jasper.

Продажа заказа SO008: enter image description here

доклд Продажа Заказ с помощью Jasper IReport 4.0.2 Инструменты:

enter image description here

ответ

0

Я помещаю услышать демо с XML-файла.

Если вы используете затмения для этой цели, тогда вы создаете первый адаптер вашего файла данных (xml, db, csv и т. Д.) И параметр создания адаптера в меню файлов, если вы уже настроили japser или ireport.

после этого выберите шаблон для отчета genrate и выберите adpter на следующем уровне, а затем выберите элемент или поле данных из вашего источника данных (например, xml, csv и т. Д.).

Я занимаюсь прослушиванием файла отчета xml и jasper с кодом и предварительным просмотром.

simple_Blue.jrxml

<?xml version="1.0" encoding="UTF-8"?> 
<!-- Created with Jaspersoft Studio version 6.1.1.final using JasperReports Library version 6.1.1 --> 
<!-- 2015-09-22T11:03:31 --> 
<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="Simple_Blue" pageWidth="595" pageHeight="842" columnWidth="535" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="cad2717b-4892-4b9b-b88d-6a498ba5c63d"> 
    <property name="com.jaspersoft.studio.data.defaultdataadapter" value="NEW_DATAADAPTER1.xml"/> 
    <queryString language="xPath"> 
     <![CDATA[/root/item]]> 
    </queryString> 
    <field name="id_1" class="java.lang.String"> 
     <fieldDescription><![CDATA[@id]]></fieldDescription> 
    </field> 
    <field name="name_1" class="java.lang.String"> 
     <fieldDescription><![CDATA[name]]></fieldDescription> 
    </field> 
    <field name="price_1" class="java.lang.String"> 
     <fieldDescription><![CDATA[price]]></fieldDescription> 
    </field> 
    <background> 
     <band/> 
    </background> 
    <title> 
     <band height="72"> 
      <frame> 
       <reportElement mode="Opaque" x="-20" y="-20" width="595" height="92" backcolor="#006699" uuid="c001d49d-79c2-4348-a3cd-2879583050ee"/> 
       <staticText> 
        <reportElement x="20" y="20" width="234" height="43" forecolor="#FFFFFF" uuid="6a037f28-72c8-4a1a-838b-87c3717e514d"/> 
        <textElement> 
         <font size="34" isBold="true"/> 
        </textElement> 
        <text><![CDATA[TITLE]]></text> 
       </staticText> 
       <staticText> 
        <reportElement x="395" y="43" width="180" height="20" forecolor="#FFFFFF" uuid="eaf746c8-e90d-4037-8277-294c4097ecca"/> 
        <textElement textAlignment="Right"> 
         <font size="14" isBold="false"/> 
        </textElement> 
        <text><![CDATA[Add a description here]]></text> 
       </staticText> 
      </frame> 
     </band> 
    </title> 
    <pageHeader> 
     <band height="13"/> 
    </pageHeader> 
    <columnHeader> 
     <band height="21"> 
      <line> 
       <reportElement x="-20" y="20" width="595" height="1" forecolor="#666666" uuid="d5b453e8-1a8b-4177-ab6c-15aa584044f0"/> 
      </line> 
      <staticText> 
       <reportElement mode="Opaque" x="0" y="0" width="185" height="20" forecolor="#006699" backcolor="#E6E6E6" uuid="a2ea42b0-c324-4c0c-94bb-1441747bfe2d"/> 
       <textElement textAlignment="Center"> 
        <font size="14" isBold="true"/> 
       </textElement> 
       <text><![CDATA[id_1]]></text> 
      </staticText> 
      <staticText> 
       <reportElement mode="Opaque" x="185" y="0" width="185" height="20" forecolor="#006699" backcolor="#E6E6E6" uuid="8d72f4c9-6fd5-4700-9a5e-13434c64558d"/> 
       <textElement textAlignment="Center"> 
        <font size="14" isBold="true"/> 
       </textElement> 
       <text><![CDATA[name_1]]></text> 
      </staticText> 
      <staticText> 
       <reportElement mode="Opaque" x="370" y="0" width="185" height="20" forecolor="#006699" backcolor="#E6E6E6" uuid="66dce252-f290-405f-ac8a-2f11cc065bb3"/> 
       <textElement textAlignment="Center"> 
        <font size="14" isBold="true"/> 
       </textElement> 
       <text><![CDATA[price_1]]></text> 
      </staticText> 
     </band> 
    </columnHeader> 
    <detail> 
     <band height="20"> 
      <line> 
       <reportElement positionType="FixRelativeToBottom" x="0" y="19" width="555" height="1" uuid="abfcf8b6-867c-46fb-b320-1fb3961e00e2"/> 
      </line> 
      <textField isStretchWithOverflow="true"> 
       <reportElement x="0" y="0" width="185" height="20" uuid="b62d2690-c680-42ef-ad61-930ecf0c5512"/> 
       <textElement> 
        <font size="14"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$F{id_1}]]></textFieldExpression> 
      </textField> 
      <textField isStretchWithOverflow="true"> 
       <reportElement x="185" y="0" width="185" height="20" uuid="97605ce2-8f11-4e21-a8f7-d1a7d4a4f3da"/> 
       <textElement> 
        <font size="14"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$F{name_1}]]></textFieldExpression> 
      </textField> 
      <textField isStretchWithOverflow="true"> 
       <reportElement x="370" y="0" width="185" height="20" uuid="29b984d4-6fe4-43b4-83d3-54e168fc2c17"/> 
       <textElement> 
        <font size="14"/> 
       </textElement> 
       <textFieldExpression><![CDATA[$F{price_1}]]></textFieldExpression> 
      </textField> 
     </band> 
    </detail> 
    <summary> 
     <band/> 
    </summary> 
</jasperReport> 

И XML файл temp.xml

<root> 

<item id="1"> 
    <name>House Box</name> 
    <price>5000</price> 
</item> 
<item id="2"> 
    <name>New Box</name> 
    <price>11000</price> 
</item> 
<item id="3"> 
    <name>Kepp Box</name> 
    <price>9000</price> 
</item> 
<item id="4"> 
    <name>Sound Box</name> 
    <price>7000</price> 
</item> 
<item id="5"> 
    <name>Desh Box</name> 
    <price>3000</price> 
</item> 
<item id="6"> 
    <name>Cloud Box</name> 
    <price>1000</price> 
</item> 

</root> 

И жаль у меня есть изображение, но я не разделяя слышать, потому что я дон имеют repution теперь покажу, что я использую его на Google Drive, общая ссылка: https://drive.google.com/open?id=0B4rHgCCP3rA9SzdFZVBmTkhwTlU