rahul.p_1 Posted February 9 Share Posted February 9 Hi, I am completely new to Jasper Reports and need a little bit of guidance. I am trying to create a report that displays results in groups based on 2 fields. I am using Jaspersoft Studio 6.21.0 and MariaDB v10.4.32. The problem I am facing is 2 folds, first, I am unable to format the output in groups and second, I do not know how to sum the values of a column in my result set. My dataset query is: SELECT primary_group, secondary_group, id, other1, other2, other3, other4, other5, other6, workdate FROM myDB.myTbl1 WHERE myDB.myTbl1.workdate >= $P{varFromDate} AND myDB.myTbl1.workdate <= $P{varToDate} ORDER BY myDB.myTbl1.primary_group ASC, myDB.myTbl1.secondary_group ASC, myDB.myTbl1.id ASC, myDB.myTbl1.other4 ASC When displaying the result, I've created a group for 'primary_group' and another group under it for 'secondary_group'. In the details section, I have added a table that uses this dataset. However, my grouping is not working properly. I need the display to be formatted as attached. When I generate a preview, the grouping only applies to the 'primary_group' column. The results break off into a new table only when the 'primary_group' field has a new value and displays all 'secondary_group' results in the same table. I've tried setting the group expression to $F{primary_group}+$F{secondary_group} but I am still having trouble. The other part of my problem is calculating the sum of one of the columns after each set is displayed. I would be very grateful for any guidance provided. Thank you. Link to comment Share on other sites More sharing options...
Teodor Danciu - Staff Posted February 13 Share Posted February 13 You should attach your JRXML here so that we could see what could be wrong with it. It is highly unlikely someone would create the JRXML you need from scratch for you. 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