Jump to content

How to conditionally arrange row data to Multiple columns without row spacing.


jisygeorge94

Recommended Posts

We arrange row data in different columns using condition(using print when expression) within simple jasper design(didn't use nested reports). but we get the reserved space between rows in individual columns.

The result(Image) is added below.

Example wise description :- Label 1  1300.000 (Refer below image)is the first row data of result set. Then label 4   (17.330) is the second row data of result set. which is conditionally arranged in two columns (Column2 , column3).Actually we need the second row data(Label 4   (17.330)) in first row of column 3.Column 3 reserve space for first row of result set. How to resolve the issue?

 

jasperresultimg.png.0d2f28bd8d65b403ff722701d79e518c.png

We need result without spacing between row in individual colums. The expected  result is added below.

jasprexpctdimg.png.edf20569b1650ae5d3818ef8f75c3463.png

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted Images

I don't think I can fully meet your requirements, but the first idea I came up with is a way to arrange the List components.

- Preview image
w20210716_preview.png.f4ae61e957f822c3c3721744effa1807.png

- Layout design image
w20210716_design.png.e43639df2adba0075e966fa6c5f56779.png

- List component properties
w20210716_list.png.7a9c2ed2836a216025ac1ca92f0678cb.png

- Parameter setting image
w20210716_parameter.png.3d84a2bad419cf4e94f8d4258fce4c89.png

 

- Dataset SQL image

select * from t1 where prod = $P{P_prod}

 

I think it can also be achieved by using Table component or arranging sub-reports.

I hope this is helpful.

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