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.

TemplatesIf a static text element is present in a group header and it contains one of the following strings, the value of the label is set tothe name of the field selected in the wizard as criterion for the group (that is, COUNTRY):GroupLabelGroup LabelLabelGroup nameGnLabel (where n in the last string represents the group number)If a textfield element is present in a group header and it contains one of the following expressions, the textfield is set to thefield selected in the wizard as criterion for the group (that is, $F{COUNTRY}):“GroupField”“Group Field”“Field”“GnField” (where n in the last string represents the group number)Please note that all the expressions are accepted with or without the apices (for compatibility with the old templates). If theapices are omitted, you get an invalid Java expression which indicates that the report did not compile correctly. I suggest youalways use the apices so you can preview your template without problems while designing it, which is extremely useful.9.3 Column HeaderThe Column Header band is analyzed by the wizard when the report is tabular, which is the default format used by the wizard.In the illustration 6 there is another old template, very similar to the ClassicC we have see in the figure 5, called ClassicT (“T”stands for Tabular). It contains a Column Header band composed of a frame element (the gray portion) and a static text withthe value DetailLabel. This is the static text the wizard will look for in order to create a label for each field. In particular, thewizard will look for a static text with one of the following strings:DetailLabelLabelHeaderIf such static text is found, the label text is replaced with the name of the field that will be shown in the Detail band at the sameposition.9.4 Detail BandFinally, the Detail band. If the report is meant to be tabular, the wizard will look for a textfield with one of the followingexpressions:“DetailField”“Field”If such a textfield is found, its expression is set to the proper field (that is, $F{ORDER_ID}).If the report template is columnar, the wizard will look in the Detail band for a static text with the same criteria described forthe column header.The Report Wizard replicates the Detail Label and the Detail Field, creating as many static text/textfield pairs as there are inthe report’s selected fields, except for the fields used in the groups.All the other bands can contain whatever elements you desire; the wizard will ignore them.9.5 Template Type and Other OptionsWe have not said yet how to force the wizard to produce a columnar layout instead of a tabular one. This can be done byadding to the report template the report property template.type. The possible values for this property are tabular andcolumnar.143

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

Saved successfully!

Ooh no, something went wrong!