ERLEDIGT
NEIN
NEIN
ANTWORTEN
0
0
ZUGRIFFE
483
483
EMPFEHLEN
-
Hallo,
ich möchte eine Tabelle erstellen mit Hilfe einer bereits zuvor generiereten xml.
Jedoch bekomme ich immer eine leere Seite. Das hatte ich bereits bei eine bar chart, sofern nicht die richtige xml Sturktur gegeben war.
Ich wollte nun fragen ob jemand ein Beispiel hat wie so eine xml aussehen sollte.
Mit SQL ist das alles kein Problem. Da es dort immer automatisch richtig ins Dataset gepflegt wird
Meine jrxml sieht momentan so aus:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
<?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="Chart_cross" language="groovy" pageWidth="802" pageHeight="350" orientation="Landscape" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0"> <property name="ireport.zoom" value="1.0"/> <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="DataSet"> <queryString language="xpath2"> <![CDATA[/employee/person]]> </queryString> <field name="id" class="java.lang.String"> <fieldDescription><![CDATA[@id]]></fieldDescription> </field> <field name="EID" class="java.lang.String"> <fieldDescription><![CDATA[EID]]></fieldDescription> </field> <field name="ENAME" class="java.lang.String"> <fieldDescription><![CDATA[ENAME]]></fieldDescription> </field> <field name="ESALARY" class="java.lang.String"> <fieldDescription><![CDATA[ESALARY]]></fieldDescription> </field> </subDataset> <parameter name="dataset" class="net.sf.jasperreports.engine.JRDataSource" isForPrompting="false"> <defaultValueExpression><![CDATA[]]></defaultValueExpression> </parameter> <queryString language="xPath"> <![CDATA[/employee/person]]> </queryString> <field name="id" class="java.lang.String"> <fieldDescription><![CDATA[@id]]></fieldDescription> </field> <field name="EID" class="java.lang.String"> <fieldDescription><![CDATA[EID]]></fieldDescription> </field> <field name="ENAME" class="java.lang.String"> <fieldDescription><![CDATA[ENAME]]></fieldDescription> </field> <field name="ESALARY" class="java.lang.String"> <fieldDescription><![CDATA[ESALARY]]></fieldDescription> </field> <detail> <band height="350" splitType="Stretch"> <componentElement> <reportElement key="" mode="Transparent" x="29" y="13" width="738" height="321" isPrintWhenDetailOverflows="true"/> <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="DataSet"/> <jr:column width="90"> <jr:tableHeader height="30" rowSpan="1"> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"/> </jr:tableHeader> <jr:tableFooter height="30" rowSpan="1"> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"/> <textField> <reportElement x="5" y="5" width="70" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{ESALARY}]]></textFieldExpression> </textField> </jr:tableFooter> <jr:columnHeader height="30" rowSpan="1"> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"/> <textField> <reportElement x="5" y="5" width="70" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{id}]]></textFieldExpression> </textField> </jr:columnHeader> <jr:columnFooter height="30" rowSpan="1"> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"/> <textField> <reportElement x="5" y="5" width="70" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{ENAME}]]></textFieldExpression> </textField> </jr:columnFooter> <jr:detailCell height="30" rowSpan="1"> <box topPadding="1" leftPadding="1" bottomPadding="1" rightPadding="1"/> <textField> <reportElement x="5" y="5" width="70" height="20"/> <textElement/> <textFieldExpression class="java.lang.String"><![CDATA[$F{EID}]]></textFieldExpression> </textField> </jr:detailCell> </jr:column> </jr:table> </componentElement> </band> </detail> </jasperReport>
Meine XML Datei sieht so aus:
Code :1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<employee> <person id="1"> <EID>36777</EID> <ENAME>kamal</ENAME> <ESALARY>1000</ESALARY> </person> <person id="2"> <EID>3456</EID> <ENAME>anu</ENAME> <ESALARY>2345</ESALARY> </person> <person id="3"> <EID>34784</EID> <ENAME>AJU</ENAME> <ESALARY>123456</ESALARY> </person> </employee>
Ich möchte nun eigentlich 3 Einträge nebeneinander als Ergebnis sehen.
Mein Dataset sieht so aus:
http://i43.tinypic.com/2rgfkg4.png
Jemand eine Idee oder vorschläge?
Vorab: Ich habe sehr wenig Ahnung von Java!
Ein wenig Java script...
Aber kann in anderen Sprachen Programmieren.
Danke vorab AlexGeändert von LexeD (07.11.11 um 16:20 Uhr)
Ähnliche Themen
-
Structure Member auslesen
Von hpbruns im Forum .NET Windows FormsAntworten: 2Letzter Beitrag: 21.07.09, 17:20 -
Qualitätssicherung mit STAN Structure Analysis for java
Von Thomas Darimont im Forum JavaAntworten: 0Letzter Beitrag: 01.02.08, 10:36 -
VB .net: structure nach byte array für DLL
Von Tensi im Forum .NET Application und Service DesignAntworten: 0Letzter Beitrag: 29.07.07, 15:20 -
CAsyncSocket::Accept - SOCKADDR structure füllen
Von solarier im Forum VisualStudio & MFCAntworten: 0Letzter Beitrag: 26.07.07, 16:09 -
Array + Structure + Datenbank
Von rabado im Forum Visual Basic 6.0Antworten: 0Letzter Beitrag: 11.09.06, 13:47





Zitieren
Login





