aspersoft problem in getting data with same tag (field) name from xml

0

Im newbie in JasperSoft. I have problem retrieving data with same tag (field) name. My xml have the name field "ChargeIssuerOrgNameRu" repeatly used.

I can only able to get the first "ChargeIssuerOrgNameRu" data,

Any help will be highly appreciated.

Thanks

jrxml : 

<textFieldExpression><!CDATA[($F{RegChargeIssuerOrgName}==null?"":$F{RegChargeIssuerOrgName}+",<br/>")]]>
</textFieldExpression>

xml :

<RegCharges>
<EntryDate>2014-04-28+06:00</EntryDate>
<ChargeIssuerOrgNameRu>first article</ChargeIssuerOrgNameRu>
</RegCharges>
 
<RegCharges>
<EntryDate>2014-05-04+06:00</EntryDate>
<ChargeIssuerOrgNameRu>Second article</ChargeIssuerOrgNameRu>
</RegCharges>

And yeah, I am not getting why the jrxml named "RegChargeIssuerOrgName" instead of "ChargeIssuerOrgNameRu" (the project is not mine)

dias_95_95's picture
Joined: Aug 27 2019 - 3:14am
Last seen: 1 month 1 week ago

2 Answers:

0

The answer is all in the expressions (XPATH) that you use to select the "rows" in the data and the fields within those rows.

See http://jasperreports.sourceforge.net/sample.reference/xmldatasource/index.html#xmldatasource

swood_1's picture
604
Joined: Nov 15 2012 - 10:47am
Last seen: 9 hours 51 min ago
0

Thank you  so much swood_1. I used subreport and it worked

dias_95_95's picture
Joined: Aug 27 2019 - 3:14am
Last seen: 1 month 1 week ago
Feedback