Jump to content
Changes to the Jaspersoft community edition download ×

group order, is this possible?

Recommended Posts

By: tim hatzenbeler - timhatz

group order, is this possible?

2002-03-09 17:22

How would I specify the Group Order? Lets say I have 5 rows with







And I would like F to print first, then D, and then all the rest can sort alphabetaly, or if I wanted, to have them sorted under (Others)





By: Teodor Danciu - teodord

RE: group order, is this possible?

2002-03-12 01:23


Hi, Tim,


JasperReports does not provide a sorting

mechanism itself.

Instead, it assumes that all the sorting needed

is already present in the data source.


To obtain a special order in the data set,

you should try to imagine creating a special

data source for you report.

Data sources are a flexible instrument that

allows creating custom reports.

I don't know what exactly are you trying to do,

but I think this is the way to go.


Good luck!





By: Jochen Bedersdorfer - beders

Possible contribution

2002-03-13 08:35

I'm facing the same problems as I cannot guarantee my input data to be in any order.


I'm toying with the idea of having a SortableDataSource that takes as input

a JRDataSource and a fieldMap

and provides sort-Methods for fields

(optionally with a Comparator)


The object itself is a JRDataSource that you can use as usual in your report.


Does that sound useful?




By: tim hatzenbeler - timhatz

RE: group order, is this possible?

2002-03-13 10:00

I was thinking about something similar, that I asked in a different question, and that to allow sql commands, where I could create a new table, and then populate it, with the sequence order I want, and then join my query to that table, and then I can print on the arrival order of my new table...



By: Teodor Danciu - teodord

data preparation

2002-03-15 04:48


Hi, Tim,


If you want to make some preparations in the

database in order to supply to your report the

right data, you should not rely on JasperReports

to do that.

You can always prepare the data outside

JasperReports and call the report-generating

routines only when everything is ready in the

database (like a special temporary table for

the report to retrieve data from).

When the report is out, you can then clean up all

the temporary data and continue.


I don' see why there should be more code in

JasperReports to deal with data preparation

since those preparations are specific to each

application that uses JasperReports and can be

done by that application itself.


You can supply a ResultSet object to

JasperReports if you want, so all the data

retrieving operations can be performed before

calling JasperReports.

The fact that it allows you to specify the query

inside the report design should be considered as

a bonus feature and I don't think we should go

further in this direction.




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