evenly spreading data in to multiple columns

Soft picture Soft · Nov 28, 2010 · Viewed 10.5k times · Source

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.

Answer

Dave Jarvis picture Dave Jarvis · Jan 6, 2011

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