Question

I recently converted a JasperReport to use the XMLDataSource instead of getting the data from the DB. This was done for performance reasons.

One of the requests was to group certain records together.

I thought I had it working, but this was because my records that were grouped, followed sequentially in the XML file I used to test. So they were already "grouped/ordered" in the XML.

Now that the report is being used in a Live environment, we have picked up that the grouping is not actually working.

After doing some searching and reading, it seems that this cannot be easily done. Because we cannot sort the records from the XMLDataSource.

So my question: Is there a way to sort/order the records from the XMLDataSource so that they will correctly group, without using a XSLT.

I only want to transform the XML as a last resort. Hoping there is another way I can do it.

Was it helpful?

Solution

Why you can't use sort inside iReport? see this for example

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top