Search code examples
jasper-reportsireport

How to add column headers in the Column Header band automatically like iReport?


I've seen some video tutorials showing that adding fields in the Detail band, will automatically add the correspondent column names in the Column Header band.

But that doesn't seem to be the same behavior in Jaspersoft Studio.

  • So how can it be don in Jaspersoft Studio?

Also I have some other questions that aren't directly related to the same title:

  • How to set the default Font for the whole report instead of having to set it to each component without using styles?
  • Jaspersoft Studio is like the new official GUI designer for JasperReports, correct? But the old iReport designer will still be updated and released alongside?

Solution

  • Question 1. Jaspersoft Studio is like the new official GUI designer for JasperReports, correct? But the old iReport designer will still be updated and released alongside?


    Yes, the Jaspersoft Studio is younger that the iReport:

    Jaspersoft Studio is a Eclipse-based version and the modern iReport is a NetBeans-based version of GUI report designer. The last version of "classic" standalone iReport was 3.0.0.

    Сurrently, the latest version for both application is 5.2.0 that support the JasperReports 5.2.0 framework.

    Question 2. How to set the default Font for the whole report instead of having to set it to each component without using styles?


    You can select several textFields and set Font property at Text Field tab like at the image below

    enter image description here

    Question 3. So how can it be done in Jaspersoft Studio?


    It can't be done automatically during editing existing report. But you can create report based on one of severals templates, with help of New Report Wizard. In this case the textField and staticText elements will be added automatically to the Column Header and Detail bands:

    enter image description here

    When you edit the existing template you can select several fields and use drag & drop feature to add this fields to the band, for example to the Column Header band.

    enter image description here