Loop over nodes and join them to one string

0

Hi,

We where discussing if we could change to use Jasper reports for a new project and stumbled upon a request I didn't know if we could do so I am asking here.

We are using xpath for data and am wondering if we can join nodes together in a comma seperated string, when looping over nodes we usually get one data per row but instead we would want to join them and I am wondering if this is possible.

Example:

If I have the following xml as in the image, can I make a string in my report that is the names of all emploeyees seperated by a comma?
Like: All those who work here are A A, B B, C C?

If I where to make them into a subreport I would get
All those who work here are:
A A
B B
C C

So would be nice if I could as I loop join them instead of having to print one per line...

We are working at the moment with iReport 5.1.0 but the new project don't have any reports as of yet so they might be able to go directly to Jasper Soft Studio but would be interesting to know if this is solveble in both tools.

Thanks for any help.
Write you later / Mårten

 

marten.carlzon's picture
Joined: Jan 28 2015 - 2:30am
Last seen: 2 days 4 hours ago

0 Answers:

No answers yet
Feedback
randomness