Jump to content
We've recently updated our Privacy Statement, available here ×

Preventing my group from being split up


jcrozier
Go to solution Solved by jgust,

Recommended Posts

Hello, first time asking a question so hopefully I'm phrasing it all right/providing the right info, etc..

 

I have a report with a few hundred rows of studies.  One of the pieces of information I have about each row (a column in the sql query) is department name.  I'd like to create groups based on department_name so that I had a report like this:

 

Cancer Department

-One cancer department study

-Another cancer department study

-Another, etc.. etc... (i.e. all o the cancer department studies)
 

Pediatric Department

-Pediatric study 1

-Pediatric Study 2

-Pediatric Study 3

-etc,etc

 

Instead I am getting 

Cancer Department

-A cancer department study

-Cancer study 2

Pediatric Department

-Pediatric study 1

Cancer Department

-Cancer study 3

Pediatric Department

-Pediatric Study 2

-Pediatric Study 3

 

 

I.e. they're being organized under their correct department, but its being broken up a bunch of times for some reason.   Any idea why?   I could provide the jasper file if helpful.

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

This problem can be solved in different ways but it will depend on how your report is made, for example, a way would be following the example offered by the documentation:

https://community.jaspersoft.com/documentation/tibco-jaspersoft-studio-user-guide/v790/creating-new-report

Although the solution of the query is useful, it is always good to know other alternatives (Generally all problems of this style are due to a bad organization of the report) because a query does not always fix the problem.

Link to comment
Share on other sites

@erikmarbad in relation to your answer, I dont see in the documentation how to prevent that grouping.  I followed the documentation in order to figure out how to group at all.  Please point me to where it discusses another way to fix this.

Link to comment
Share on other sites

  • Solution

@jcrozier
>> Curious if it could have been controlled on the jasper side though

You will need to add a sort to the report.  In other report engines grouping and sorting is one transaction.  In Jasper, it is two.

 

With Sorting


 

Without Sorting


Link to comment
Share on other sites

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