Jump to content
Changes to the Jaspersoft community edition download ×

It is possible to show a row group in JrTable ?


victoriam0727

Recommended Posts

Hello, can anyone tell me how I can  show a group in a JRTable ?



I know that I can add groups in my dataset used by the JRTable, but there is not a visible space in JRTable for put the totals by groups by example like in crosstabs.



I don't want to use   crosstabs because this is a most complicated JR object and the columns for my table is known (not dynamic).



Please help me if you have an elegant solution for printing group row in a JRTable.



Thanks  



 

 

 

 

 

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

I am generating the JRXML file depending on different options, but ones I can find out the solution in iReport I will know how generate my jrxml file.


I don't wont to use groups with styles for constructing my table because I have the solution of jrTable object but, from java doc of the jasperReports API , the groups of a table dataSet have not visible space, they are used only for calculate values.  
 

 

P.S. I am from Romania also and I am glad to know that you are too.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 years later...

Hi, I too was looking for similar feature in jasper report. The following steps guide you with another way of achieving the desired result using JrTable.

1) Write a query in the report's main dataset, to fetch the list of values(grouping row values - e.g. product_category), by which to group the records.

2) Create another dataset(sub dataset) that takes the grouping row value(product_category) as a parameter and fetches the needed records.

3) Insert the table in the detail band, and map the grouping field value(product_category) from the field of the main dataset.

4) Now design the desired header and footer(using text elements or static elements, or any other elements you want) above and below the table you inserted.

Actually, the concept is to repeat the table for each grouping field, by putting the table in the detail band. Hope it helps you.

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