Setting Up the iReport Pages

Configuring the page format

We can follow the listed steps for setting up report pages:

  1. Open the report List of Products.
  2. Go to menu Window | Report Inspector. The following window will appear on the left side of the report designer:
  3. iReport 3.7

  4. Select the report List of Products, right-click on it, and choose Page Format….
  5. iReport 3.7

  6. The Page format… dialog box will appear, select A4 from the Format drop-down list, and select Portrait from the Page orientation section.
  7. iReport 3.7

  8. You can modify the page margins if you need to, or leave it as it is to have the default margins. For our report, you need not change the margins.
  9. Press OK.

Page size

You have seen that there are many preset sizes/formats for the report, such as Custom, Letter, Note, Legal, A0 to A10, B0 to B5, and so on. You will choose the appropriate one based on your requirements. We have chosen A4. If the number of columns is too high to fit in Portrait, then choose the Landscape orientation.

If you change the preset sizes, the report elements (title, column heading, fields, or other elements) will not be positioned automatically according to the new page size. You have to position each element manually. So be careful if you decide to change the page size.

Configuring properties

We can modify the default settings of report properties in the following way:

  1. Right-click on List of Products and choose Properties.
  2. iReport 3.7

  3. We can configure many important report properties from the Properties window.

iReport 3.7

You can see that there are many options here. You can change the Report name, Page size, Margins, Columns, and more. We have already learnt about setting up pages, so now our concern is to learn about some of the other (More…) options.

What are the different checkboxes?

You'll see Title on a new page, Summary on a new page, Floating column footer, Ignore pagination checkboxes in the More... tab in the report Properties window.

What will happen if you check these options?

Title on a new page

If this option is checked, then the report title will be shown on a new page, that is, the report title will be shown on the first page without any data, and the report data will be shown on subsequent pages.

Summary on a new page

If the report contains a summary, generally it is shown just after the data, but if this option is checked, then the summary will be shown on a new page. Don't worry about the report summary, as you will learn about the report summary in the coming chapters.

Floating column footer

If a report has column footer, then it is generally shown at the bottom of the page. However, if this option is checked, then column footer will be shown at the bottom of the column, even if it is in the start/middle of the page.

Ignore pagination

If this option is checked, then the whole report will be shown in a single page. Your page size settings (height of the page) will not work if you check this option. Page height will depend on the report data. If data is less, then the page height will be small, but the height will be increased if data is more. This option is suitable for POS printing where the page height depends on the products the customer purchases.

When there is no data

When we execute the report, it is filled with data from the data source (database or others). But sometimes there may be no data (depending on the query). What will happen then? We may deal with this situation using the When No Data option in the More... section of the report Properties window. There are four options :

  • No pages: If the report has no data, then just a dialog box will be shown with the message The document has no pages and the report viewer will not be shown.
  • iReport 3.7

  • Blank Page: The report viewer will be shown with a blank page like the following screenshot:
  • iReport 3.7

  • All Sections, No Detail: All sections of the report will be shown without data, that is, you will see just the report structure.
  • iReport 3.7

  • No data Section: If no data is available, then a customized message will be shown in the report page of the report viewer. In order to do this, just checking the checkbox is not enough, you have to configure the NoData band.
  • iReport 3.7


In this article, we discussed report layouts.

If you have read this article you may be interested to view :

You've been reading an excerpt of:

iReport 3.7

Explore Title