Jump to content
We've recently updated our Privacy Statement, available here ×

how to create a list inside a list with an XML datasource???


gianluca.mazzaferro

Recommended Posts

working on JasperStudio 5.6.2.

Here my jrxml i created for test... Nested list is not shown...

 

<?xml version="1.0" encoding="UTF-8"?>
<!-- Created with Jaspersoft Studio version 5.6.2.final using JasperReports Library version 4.5.0  -->
<!-- 2014-11-19T12:02:01 -->
<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="dana" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="terapi"/>
<subDataset name="Dataset1">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="terapi"/>
<queryString language="xPath">
<![CDATA[/report/patient/therapy/day]]>
</queryString>
<field name="date_1" class="java.lang.String">
<fieldDescription><![CDATA[@date]]></fieldDescription>
</field>
<field name="prescription" class="java.lang.String">
<fieldDescription><![CDATA[prescription]]></fieldDescription>
</field>
</subDataset>
<subDataset name="Dataset2">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="terapi"/>
<queryString language="xPath">
<![CDATA[.]]>
</queryString>
<field name="type" class="java.lang.String">
<fieldDescription><![CDATA[@type]]></fieldDescription>
</field>
<field name="medicine" class="java.lang.String">
<fieldDescription><![CDATA[medicine]]></fieldDescription>
</field>
<field name="codmsan" class="java.lang.String">
<fieldDescription><![CDATA[codmsan]]></fieldDescription>
</field>
<field name="prescriptor" class="java.lang.String">
<fieldDescription><![CDATA[prescriptor]]></fieldDescription>
</field>
<field name="route" class="java.lang.String">
<fieldDescription><![CDATA[route]]></fieldDescription>
</field>
<field name="route-id" class="java.lang.String">
<fieldDescription><![CDATA[route-id]]></fieldDescription>
</field>
<field name="administrations" class="java.lang.String">
<fieldDescription><![CDATA[administrations]]></fieldDescription>
</field>
<field name="suspension-notes" class="java.lang.String">
<fieldDescription><![CDATA[suspension-notes]]></fieldDescription>
</field>
<field name="closing-date" class="java.lang.String">
<fieldDescription><![CDATA[closing-date]]></fieldDescription>
</field>
<field name="closing-time" class="java.lang.String">
<fieldDescription><![CDATA[closing-time]]></fieldDescription>
</field>
<field name="closing-operator" class="java.lang.String">
<fieldDescription><![CDATA[closing-operator]]></fieldDescription>
</field>
<field name="revaluations" class="java.lang.String">
<fieldDescription><![CDATA[revaluations]]></fieldDescription>
</field>
<field name="rate_1" class="java.lang.String">
<fieldDescription><![CDATA[rate]]></fieldDescription>
</field>
</subDataset>
<subDataset name="Dataset3">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="terapi"/>
<queryString language="xPath">
<![CDATA[/report/patient/therapy/day/prescription]]>
</queryString>
<field name="type" class="java.lang.String">
<fieldDescription><![CDATA[@type]]></fieldDescription>
</field>
<field name="medicine" class="java.lang.String">
<fieldDescription><![CDATA[medicine]]></fieldDescription>
</field>
<field name="codmsan" class="java.lang.String">
<fieldDescription><![CDATA[codmsan]]></fieldDescription>
</field>
<field name="prescriptor" class="java.lang.String">
<fieldDescription><![CDATA[prescriptor]]></fieldDescription>
</field>
<field name="route" class="java.lang.String">
<fieldDescription><![CDATA[route]]></fieldDescription>
</field>
<field name="route-id" class="java.lang.String">
<fieldDescription><![CDATA[route-id]]></fieldDescription>
</field>
<field name="administrations" class="java.lang.String">
<fieldDescription><![CDATA[administrations]]></fieldDescription>
</field>
<field name="suspension-notes" class="java.lang.String">
<fieldDescription><![CDATA[suspension-notes]]></fieldDescription>
</field>
<field name="closing-date" class="java.lang.String">
<fieldDescription><![CDATA[closing-date]]></fieldDescription>
</field>
<field name="closing-time" class="java.lang.String">
<fieldDescription><![CDATA[closing-time]]></fieldDescription>
</field>
<field name="closing-operator" class="java.lang.String">
<fieldDescription><![CDATA[closing-operator]]></fieldDescription>
</field>
<field name="revaluations" class="java.lang.String">
<fieldDescription><![CDATA[revaluations]]></fieldDescription>
</field>
<field name="rate_1" class="java.lang.String">
<fieldDescription><![CDATA[rate]]></fieldDescription>
</field>
</subDataset>
<queryString language="xPath">
<![CDATA[/report]]>
</queryString>
<field name="name" class="java.lang.String">
<fieldDescription><![CDATA[@name]]></fieldDescription>
</field>
<field name="icons-manager-url" class="java.lang.String">
<fieldDescription><![CDATA[icons-manager-url]]></fieldDescription>
</field>
<field name="current-date" class="java.lang.String">
<fieldDescription><![CDATA[current-date]]></fieldDescription>
</field>
<field name="hospital-name" class="java.lang.String">
<fieldDescription><![CDATA[hospital-name]]></fieldDescription>
</field>
<field name="asl-name" class="java.lang.String">
<fieldDescription><![CDATA[asl-name]]></fieldDescription>
</field>
<field name="hospital-discipline" class="java.lang.String">
<fieldDescription><![CDATA[hospital-discipline]]></fieldDescription>
</field>
<field name="hospital-discipline-director-name" class="java.lang.String">
<fieldDescription><![CDATA[hospital-discipline-director-name]]></fieldDescription>
</field>
<field name="hospital-discipline-director-surname" class="java.lang.String">
<fieldDescription><![CDATA[hospital-discipline-director-surname]]></fieldDescription>
</field>
<field name="hospital-department" class="java.lang.String">
<fieldDescription><![CDATA[hospital-department]]></fieldDescription>
</field>
<field name="reporter-name" class="java.lang.String">
<fieldDescription><![CDATA[reporter-name]]></fieldDescription>
</field>
<background>
<band splitType="Stretch"/>
</background>
<title>
<band height="84" splitType="Stretch">
<textField>
<reportElement x="71" y="54" width="100" height="30"/>
<textFieldExpression><![CDATA[$F{asl-name}]]></textFieldExpression>
</textField>
</band>
</title>
<pageHeader>
<band height="35" splitType="Stretch"/>
</pageHeader>
<columnHeader>
<band height="61" splitType="Stretch"/>
</columnHeader>
<detail>
<band height="360" splitType="Stretch">
<componentElement>
<reportElement x="0" y="0" width="554" height="360"/>
<jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">
<datasetRun subDataset="Dataset1">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/report/patient/therapy//day")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="360" width="554">
<textField>
<reportElement x="0" y="0" width="100" height="30"/>
<textFieldExpression><![CDATA[$F{date_1}]]></textFieldExpression>
</textField>
<frame>
<reportElement x="338" y="4" width="5" height="41"/>
</frame>
<componentElement>
<reportElement x="0" y="100" width="554" height="98"/>
<jr:list printOrder="Vertical">
<datasetRun subDataset="Dataset3">
<dataSourceExpression><![CDATA[((net.sf.jasperreports.engine.data.JRXmlDataSource)$P{REPORT_DATA_SOURCE}).subDataSource("/report/patient/therapy/day/prescription")]]></dataSourceExpression>
</datasetRun>
<jr:listContents height="98" width="554">
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{type}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{medicine}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{codmsan}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{prescriptor}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{route}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{route-id}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{administrations}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{suspension-notes}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{closing-date}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{closing-time}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{closing-operator}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{revaluations}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="0" height="0"/>
<textFieldExpression><![CDATA[$F{rate_1}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="0" width="100" height="30"/>
<textFieldExpression><![CDATA[$F{medicine}]]></textFieldExpression>
</textField>
</jr:listContents>
</jr:list>
</componentElement>
</jr:listContents>
</jr:list>
</componentElement>
</band>
<band height="98"/>
</detail>
<columnFooter>
<band height="45" splitType="Stretch"/>
</columnFooter>
<pageFooter>
<band height="54" splitType="Stretch"/>
</pageFooter>
<summary>
<band height="42" splitType="Stretch"/>
</summary>
</jasperReport>
 
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...