Jump to content
Changes to the Jaspersoft community edition download ×

multiple sorting order on same xml datasource


2004 IR Help

Recommended Posts

By: Friedemann Becker - fnbecker

multiple sorting order on same xml datasource

2005-05-13 08:14

I have an xml datasource that I wan't to reuse in different subreports. The problem is, that the sorting order should be different. Make a copy of the datasource is not an option for me, because it has quite much data and has to be transferred from the server to a client application, which takes some time.

 

Any ideas?

 

 

 

 

 

By: brent - bvbenson

RE: multiple sorting order on same xml datasource

2005-05-13 08:22

create XSLT templates and move those accross you should be able to keep that around a K in size. You can then use your datasource, but run it through the transformation on the client side and pick up the new file. That is the only way I can think of solving the issue.

 

 

 

 

By: C-Box - c-box

RE: multiple sorting order on same xml dataso

2005-05-15 00:36

Just my two cent...

 

make your customdatasource clonable and use a datasourceexpression in your SubReportElement like this:

 

$P{MySubReportDataSource}.doCloneAndSortBy("TheSourceFieldNameThatTheNewClonedDataSourceShoulBeSortedBy")

 

in the method "doCloneAndSortBy" you can first make a clone and after that sort the cloned datasource by the name of the field that is passed in and return it as JRDataSource.

 

not tried yet (the sorting) but at least the cloning works fine for me.

 

hth

C-Box

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...