evenly spreading data in to multiple columns

2019-03-18 06:56发布

I need to create a jasper report that contains two columns of data of equal length. For example, I have a collection of 50 columns. I want precisely two columns of 25 entries each. How can I do this?

Thanks.

1条回答
劫难
2楼-- · 2019-03-18 07:23

Using iReport

  1. Start iReport.
  2. Click File » New.
  3. Click Open this template.
  4. Click Next.
  5. Click Finish.
  6. Click report1 in the Report Inspector.
  7. Scroll down in the Properties panel until you see Columns.
  8. Change Columns from 1 to 2.
  9. Scroll down until you see Print order.
  10. Change the value to Horizontal.

The page content should divide in half. Place the objects in the left-hand side of the page.

Using Jaspersoft Studio

  1. Open JasperSoft Studio 5.6.
  2. Open Report
  3. Click report name in the Outline view
  4. In Report Properties, click Report
  5. Scroll down to "Edit Page Format"
  6. Change the columns

By printing the object values across the page, rather than down each column, the results will split evenly between the two columns. (A horizontal print order will prevent a lopsided split.)

查看更多
登录 后发表回答