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 StructureMultiple columns are commonly used for prints of very long lists (for example, the telephone book). The sum of the margins,column widths and every space between columns, has to be less than or equal to the page width. If this condition is notverified, the compilation can result in error.When working with more than one column, you should put elements (fields, images, etc.) inside the first column only. Theother columns are displayed in the designer just for reference, but any element placed here at design time would be treated aspart of the first column (in fact, you are just defining a detail template, so there are no restrictions about placing elementsoutside the horizontal band’s bounds, but it would be like putting elements outside the page).Figure 4-10Safe area to place report elements (textfields, images, etc.)The following picture shows the “unsafe” areas. They are essentially the margins and all of the page that is to the right of thefirst column.Of course, the rules about placing elements are applied to the report even if there is only a single column.4.1.3 Advanced Report OptionsUp to now we have seen only basic characteristics concerning the layout. Now we will see some advanced options. Some ofthem will be examined thoroughly and explained in every detail in the following chapters, but some of them can be fullyunderstood and applied in a useful way only after you become familiar with UR.4.1.3.1 ScriptletA scriptlet is a Java class whose methods are executed according to specific events during report creation, such as thebeginning of a new page or the end of a group. For those who are familiar with visual tools such as Microsoft Access orMicrosoft Excel, a scriptlet can be compared with a module in which procedures associated with other events or functions (forexample, the expression of a textfield) are inserted. The scriptlet property identifies only the main scriptlet, but other scriptletscan be added to the report by using the Report Inspector. I discuss scriptlets at length in Chapter 18.4.1.3.2 Resource BundleThe resource bundle is a property used when you want to internationalize a report. A resource bundle is the set of files thatcontain the text of the labels, sentences, and expressions used within a report in one defined language. What you set in theresource bundle property is the resource bundle base name that’s the prefix through which you can find the file with the correcttranslation. In order to reconstruct the file name required for a particular language, some language/country initials (forexample, “_it_IT” for Italian-Italy) are added to this prefix, as well as the .properties extension. I will explaininternationalization in greater detail in Chapter 17.53

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

Saved successfully!

Ooh no, something went wrong!