Setting Up the iReport Pages

Exclusive offer: get 50% off this eBook here
iReport 3.7

iReport 3.7 — Save 50%

Learn how to use iReport to create, design, format, and export reports

$23.99    $12.00
by Shamsuddin Ahammad | March 2010 | Java Open Source

This article by Shamsuddin Ahammad, author of iReport 3.7, covers configuring report properties

If we use the Report Wizard for generating reports, some default report properties (page size, margins, and so on) are set automatically. For our software or reports, we may need to modify the default report properties at times, so that it fulfills the user (or software) requirements.

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.

iReport 3.7 Learn how to use iReport to create, design, format, and export reports
Published: April 2010
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

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

Summary

In this article, we discussed report layouts.


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

iReport 3.7 Learn how to use iReport to create, design, format, and export reports
Published: April 2010
eBook Price: $23.99
Book Price: $39.99
See more
Select your format and quantity:

About the Author :


Shamsuddin Ahammad

Shamsuddin Ahammad is a Senior Lecturer and the Course Coordinator at Daffodil Institute of IT, Bangladesh. He has been teaching Java, Programming Methods, and Database Systems since 2002. He has experience in supervising hundreds of academic projects. Shamsuddin has a Masters degree in Management Information Systems (MIS) from Daffodil International University, Dhaka. He obtained the BSc(Hons) degree in Computing & Information Systems (CIS) of NCC Education Ltd, UK and London Metropolitan University joint programme from Daffodil Institute of IT. Before that, he completed the IDCS & IADCS of NCC Education Ltd. He is an Additional Reviewer of Conference on Quality Engineering in Software Technology (CONQUEST) organized by International Software Quality Institute (iSQI) in Germany. He is the author of book titled iReport 3.7 published from PACKT Publishing in March 2010.

Books From Packt


jQuery 1.4 Reference Guide
jQuery 1.4 Reference Guide

Getting started with Audacity 1.3
Getting started with Audacity 1.3

CMS Made Simple 1.6: Beginner's Guide
CMS Made Simple 1.6: Beginner's Guide

Apache MyFaces 1.2 Web Application Development
Apache MyFaces 1.2 Web Application Development

Drupal E-commerce with Ubercart 2.x
Drupal E-commerce with Ubercart 2.x

NetBeans Platform 6.8 Developer's Guide
NetBeans Platform 6.8 Developer's Guide

ZK Developer’s Guide
    ZK Developer’s Guide

Groovy for Domain-Specific Languages
Groovy for Domain-Specific Languages


Your rating: None Average: 1 (1 vote)

Post new comment

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
d
F
D
N
B
c
Enter the code without spaces and pay attention to upper/lower case.
Code Download and Errata
Packt Anytime, Anywhere
Register Books
Print Upgrades
eBook Downloads
Video Support
Contact Us
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software