13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Report StructureCHAPTER 4REPORT STRUCTUREIn this chapter we will analyze the report structure, the underlying template that determines the style and organization of areport. We will see the parts that compose it and how they behave in relation to input data as <strong>iReport</strong> creates an output report.This chapter has the following sections:• Bands• Working with Bands• Summary4.1 BandsA report is defined by means of a type page. This is divided into different horizontal portions named “bands.” When the reportis joined with data to run the print, these sections are printed many times according to their function (and according to the rulesthat the report author has set up). For instance, the page header is repeated at the beginning of every page, while the Detailband is repeated for every elaborated record.Figure 4-1 on page 46 shows a type page divided into the nine main pre-defined bands to which new groups are added. Infact, <strong>iReport</strong> manages a heading band (Group header) and a recapitulation band (Group footer) for every group. Detail, GroupHeader and Group Footer bands can then be split further into several bands, so we can have Detail 1, Detail 2, and so on.A band is always as wide as the usable page width (that is, excluding the right and left margins). However, its height, even if itis established during the design phase, can vary during the print creation according to the contained elements; it can lengthentowards the bottom of page in an arbitrary way. This typically occurs when bands contain subreports or textfields that have toadapt to the content. Generally, the height specified by the user should be considered the minimal height of the band. Not allbands can stretch dynamically according to the content, in particular the Column Footer, Page Footer and Last Page Footerbands.In general, the sum of all band heights (except for the background) always has to be less than or equal to the page height minusthe top and bottom margins. This rule actually is much more complicated, in fact, there are several different cases and optionsthat must be considered; for example, the Title band may be printed on a different page, the Page Footer and the Last PageFooter may have different sizes and are never considered together, and so on. For your convenience, the maximum allowedband size is dynamically calculated at design time by <strong>iReport</strong>, which prevents the user from setting invalid band heights(which would lead to a layout verification error at compile time)45

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!