iReport Ultimate Guide - Nimsoft Library
iReport Ultimate Guide - Nimsoft Library iReport Ultimate Guide - Nimsoft Library
iReport Ultimate GuideConsecutive zero-height bands may become obscured while working in the design panel. You can increase the heightof a selected band by pressing the Shift key while dragging the bottom margin of the band down.The Print When Expression property is used to hide or display the band under the circumstances described by theexpression. The expression must return a Boolean value. In particular, it must return true to display the band and false to hideit. By default, when no value is defined for the expression, the band is displayed.UR reserves enough space in a page for bands like the title, the page header and footer and the column header andfooter. All the other bands cannot fit in the remaining space when repeated several times. This may result in a Detail bandbeginning in one page and ending on another page.If you want to be ensure that a band displays completely within one page, deselect the Split allowed property. Every timethe band is printed, UR will check the available space in the current page. If it is not enough, the band will start onthe next page. Of course, this does not mean that the band will completely fit in the next page, this still depends of the bandcontent.The default report template includes all the pre-defined bands, except the Last Page Footer and the No Data bands. If you arenot interested in using a band, you can remove it by right-clicking the band (or the band node in the outline view) and selectingthe menu item Delete Band. When a band is no longer present in the report, it is displayed as a grayed node (see Figure 7-2).To add the band to the report, right-click the band and select Add Band.Figure 7-2Adding a pre-defined bandIn general, there is no valid reason to remove a band apart the generation of a less complex JRXML file (the report sourcecode). In order to prevent the printing of a band, set its height to 0. The only exceptions are the Last Page Footer and No Databands.If present, the Last Page Footer band always replaces the Page Footer band in the last page, so if we don’t want or need thisbehavior the band must be not present. The No Data band is a very special band that replaces the entire report if the data sourcedoes not contain any records and if, at the document level, the property When No Data Type has been set to No DataSection.7.2 Working with GroupsGroups allow you to organize the records of a report in order to create some structures. A group is defined through anexpression. UR evaluates this expression thus: a new group begins when the expression value changes. An112
Bands and Groupsexpression may be represented just by a specific field (that is, you may want to group a set of contacts by city, or country), butit can be more complex as well. For example, you may want to group a set of contact names by initial letter.Figure 7-3Group bandsEach group can have one or more header and one or more footer bands. Group headers and footers are printed just before andafter the Detail band. You can define an arbitrary number of groups (that is, you can have a first-level group that containscontacts by Country and a nested group containing the contacts in each country by City).The order of the groups in the Report Inspector determines the groups’ nesting order. The group order can be changed by rightclickinga group node (header or footer) and selecting the Move Group Up or Move Group Down menu items (see Figure 7-4on page 113).Figure 7-4Changing the groups order113
- Page 61 and 62: Report Structureexample, in a repor
- Page 63 and 64: Report ElementsCHAPTER 5REPORT ELEM
- Page 65 and 66: Report ElementsFigure 5-3Guidelines
- Page 67 and 68: Report ElementsFigure 5-6Element no
- Page 69 and 70: Report ElementsTable 5-1Formatting
- Page 71 and 72: Report ElementsFigure 5-10Table 5-2
- Page 73 and 74: Report ElementsFigure 5-11Custom el
- Page 75 and 76: Report Elements5.1.5.2 RectangleThe
- Page 77 and 78: Report ElementsTable 5-4TypeImage E
- Page 79 and 80: Report ElementsTable 5-5OptionImage
- Page 81 and 82: Report ElementsCode Example 5-1Dyna
- Page 83 and 84: Report ElementsCode Example 5-2Prin
- Page 85 and 86: Report ElementsPDF font namePDF enc
- Page 87 and 88: Report ElementsFor your convenience
- Page 89 and 90: Report ElementsHere there are some
- Page 91 and 92: Report ElementsThe following briefl
- Page 93 and 94: 5.5 Adding Custom Components and Ge
- Page 95 and 96: Fields, Parameters, and VariablesCH
- Page 97 and 98: Fields, Parameters, and VariablesIn
- Page 99 and 100: 6.1.2 Accessing the SQL Query Desig
- Page 101 and 102: Fields, Parameters, and Variables6.
- Page 103 and 104: 6.2.3 Built-in ParametersFields, Pa
- Page 105 and 106: Fields, Parameters, and VariablesRe
- Page 107 and 108: Fields, Parameters, and Variables6.
- Page 109 and 110: Fields, Parameters, and VariablesTa
- Page 111: Bands and GroupsCHAPTER 7BANDS AND
- Page 115 and 116: Bands and GroupsFigure 7-6Dragging
- Page 117 and 118: Bands and GroupsFigure 7-10The firs
- Page 119 and 120: Bands and GroupsFigure 7-14 shows t
- Page 121 and 122: 7.3 Other Group OptionsBands and Gr
- Page 123 and 124: Fonts and StylesCHAPTER 8FONTS AND
- Page 125 and 126: Fonts and StylesThe list of availab
- Page 127 and 128: Fonts and StylesFigure 8-5Font Exte
- Page 129 and 130: Fonts and StylesFigure 8-7Font Exte
- Page 131 and 132: Fonts and StylesFigure 8-10The new
- Page 133 and 134: Fonts and StylesTo apply a style to
- Page 135 and 136: Fonts and StylesFigure 8-17The outl
- Page 137 and 138: TemplatesCHAPTER 9TEMPLATESOne of t
- Page 139 and 140: TemplatesFigure 9-2Columnar reportA
- Page 141 and 142: TemplatesFigure 9-4Group by step in
- Page 143 and 144: TemplatesIf a static text element i
- Page 145 and 146: TemplatesFigure 9-8Your custom temp
- Page 147 and 148: TemplatesFigure 9-10New template in
- Page 149 and 150: TemplatesFigure 9-12Preview of repo
- Page 151 and 152: SubreportsCHAPTER 10 SUBREPORTSSubr
- Page 153 and 154: SubreportsFigure 10-3Subreport elem
- Page 155 and 156: SubreportsFigure 10-4Subreport Para
- Page 157 and 158: SubreportsFigure 10-7Just a list of
- Page 159 and 160: SubreportsFigure 10-11 Subreport Wi
- Page 161 and 162: SubreportsFigure 10-14 The final re
<strong>iReport</strong> <strong>Ultimate</strong> <strong>Guide</strong>Consecutive zero-height bands may become obscured while working in the design panel. You can increase the heightof a selected band by pressing the Shift key while dragging the bottom margin of the band down.The Print When Expression property is used to hide or display the band under the circumstances described by theexpression. The expression must return a Boolean value. In particular, it must return true to display the band and false to hideit. By default, when no value is defined for the expression, the band is displayed.UR reserves enough space in a page for bands like the title, the page header and footer and the column header andfooter. All the other bands cannot fit in the remaining space when repeated several times. This may result in a Detail bandbeginning in one page and ending on another page.If you want to be ensure that a band displays completely within one page, deselect the Split allowed property. Every timethe band is printed, UR will check the available space in the current page. If it is not enough, the band will start onthe next page. Of course, this does not mean that the band will completely fit in the next page, this still depends of the bandcontent.The default report template includes all the pre-defined bands, except the Last Page Footer and the No Data bands. If you arenot interested in using a band, you can remove it by right-clicking the band (or the band node in the outline view) and selectingthe menu item Delete Band. When a band is no longer present in the report, it is displayed as a grayed node (see Figure 7-2).To add the band to the report, right-click the band and select Add Band.Figure 7-2Adding a pre-defined bandIn general, there is no valid reason to remove a band apart the generation of a less complex JRXML file (the report sourcecode). In order to prevent the printing of a band, set its height to 0. The only exceptions are the Last Page Footer and No Databands.If present, the Last Page Footer band always replaces the Page Footer band in the last page, so if we don’t want or need thisbehavior the band must be not present. The No Data band is a very special band that replaces the entire report if the data sourcedoes not contain any records and if, at the document level, the property When No Data Type has been set to No DataSection.7.2 Working with GroupsGroups allow you to organize the records of a report in order to create some structures. A group is defined through anexpression. UR evaluates this expression thus: a new group begins when the expression value changes. An112