duy.nguyen_1 Posted October 2, 2019 Share Posted October 2, 2019 I have a dataset like this.ColA ColB ColC ColDA1 B1 C1 D1A1 B2 C1 D1A1 B2 C2 D2A2 B1 C1 D1A2 B1 C1 D1I want my report to display like this.1 A1 B1 C1 D12 A1 B2 C1 D1 C2 D23 A2 B2 C1 D1 C2 D2Because of the layout i dont use table, what is the right direction to do this?Query is executed in code and pass a JRResultSet as datasource to report. I'm using Jasperreport 6.9.0.Thanks a lot. Link to comment Share on other sites More sharing options...
Solution C-Box Posted October 2, 2019 Solution Share Posted October 2, 2019 Not sure, whether I understood correctly but it seems that you could use a group with (concated) Expression $F{ColA}+$F{ColB} then you but both fields from ColumnA and ColumnB into the groupHeader-Band and the other two fields from ColC and ColD into the detail-Band with a slight indention. For numbering the groups you could just create a simple variable "MyGroupNumber" and add just 1 with calculation time group. (e.g. for variable expression $V{MyGroupNumber} +1)just give it a try or post if I missunderstood the problemhth + regardsC-Box Link to comment Share on other sites More sharing options...
duy.nguyen_1 Posted October 2, 2019 Author Share Posted October 2, 2019 Thank you for your answer, follow your instruction i created a group with $F{ColA}+$F{ColB} expression and it worked like a charm. 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