heavensinformaticagmail.c Posted October 4, 2019 Share Posted October 4, 2019 Hello friends, how can I automatically define a student's position based on their average?My list is organized in alphabetical order, but I would like to be able to automatically fill in the "Position" field according to the average of each student.This is what I wish: This is what I have: Link to comment Share on other sites More sharing options...
C-Box Posted October 4, 2019 Share Posted October 4, 2019 You could ORDER BY your Average Column already in your sql-query and use the ROW_NUMBER() or perhaps better the RANK() Function to number these results in a separate column e.g. "Position"In your Report you can then use the built-in JasperOrdering (sort menue/button in iReport) by the field "$F{StudentName}" again, to alphabetical order by students name.Not tried, but worth to give it a try.hth + regardsC-Box Link to comment Share on other sites More sharing options...
heavensinformaticagmail.c Posted October 5, 2019 Author Share Posted October 5, 2019 Thanks so much @C-BoxBut I want to do it only with Jasper. In a crosstab I can do it. I can rank by expression. I want to do the same with a regular report.If You have any advice I'l appreciate it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now