Jump to content
Changes to the Jaspersoft community edition download ×

Question about display data in groups

Go to solution Solved by C-Box,

Recommended Posts

I have a dataset like this.

ColA    ColB    ColC    ColD

A1       B1      C1       D1

A1       B2      C1       D1

A1       B2      C2       D2

A2       B1      C1       D1

A2       B1      C1       D1

I want my report to display like this.

1 A1     B1

         C1     D1

2 A1     B2

         C1     D1

         C2     D2

3 A2     B2

         C1     D1

         C2     D2

Because 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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

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 problem

hth + regards


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