Jump to content
Changes to the Jaspersoft community edition download ×

View Top N Records


Recommended Posts

By: willyw - willyw

View Top N Records

2003-08-15 03:04

Hi, i am currently create a report that require to see top 10 records base on the quantity in the table, i have no idea how to design in coding. Any help is very much appreciate, thanks!

 

p/s: this is as similar to the Top N/Sort Group Expert feature in Crystal Reporting.

 

 

 

 

By: G᢯r M󣺡r - moczar

RE: View Top N Records

2003-08-15 03:56

You can build your sql query which will order and limit the resultset.

E.g.

SELECT * FROM products ORDER BY quantity LIMIT 10

 

You can use parameters in your query, so the user can define e.g. how many records does he/she want to display.

E.g.

SELECT * FROM products ORDER BY quantity LIMIT $P!{limitvalue}, where limitvalue is the name of the parameter.

 

Of course, you have the possibility to modify the resultset after the SELECT too, but I am not very good in scriplets...

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