Jasper: Concatenate strings from different xsl nodes in iReport



Let's suppose the following XML used as a datasource in a Jasper report:



<B>
<C>text1</C>
<C>text2</C>
<C>text3</C>

<List number="1">
<ListElement1 key="k1" />
<ListElement2 key="k2" />
</List>

<List number="2 />
</B>

<B></B>
<B></B>


In a report list element which lists nodes, i'd like to print C texts concatenated as "text1, text2, text3", but there are some problems:



  • It is no possible to use Xpath functions in datasets.

  • Also, using the Report query in iReport doesn't let me define fields from relative paths, such as ../../C from List.


Is there a straightforward way to do this? I mean, not using subReports and anything like that.


No comments:

Post a Comment