Changes

Jump to: navigation, search

Format an iReport Template

471 bytes added, 21:29, 20 February 2020
no edit summary
*"Float": This value allows the element to "float" and will display the element relative to elements that come before it (i.e. closer to the top or closer to the left margins).
Using the '''Float''' Position Type can help eliminate the overlapping that can occur happen when displaying multiple charts or cross tabs in a single report template. ===Stretch with Overflow===__NOEDITSECTION__Another useful formatting option is '''Stretch with Overflow'''. Setting this property means that the height of the field will adapt to the value, instead of the value being cut if it requires more space than available for the field.* On the '''Properties''' pane tick the '''Stretch with Overflow''' element. *: [[Image:iReport_Format_Stretch_with_overflow.png|center|300px|''Stretch with Overflow'']]<div align="center">''Stretch with Overflow''</div>
==Formatting Tools==__NOEDITSECTION__
==Conditional Display==__NOEDITSECTION__
Sometimes it is important to change the display of some data extracted from IMSMA for the resulting report. For example, you want to change:
* the value “null” "null" to “no”"no"* the value “Male” "Male" to “Men”"Men"
To do this, you use conditional statements in the element on the iReport.
# On the '''Properties''' pane select the '''Text Field Expression''' and open the '''Text Field Expression Editor'''.
#: [[Image:IReport Charts5.png|center|500px|''Text Field Expression Editor'']]<div align="center">''Text Field Expression Editor''</div>
# To change the way a particular field is displayed you can use basic "ïfif-then-else" logic as in other [[Summarize i-Report iReport Template Data#Variable Expressions|Variable Expressions]]. This follows the pattern: $F{field} == null ? “Something"Something" : $F{field}
Or nested:
$F{field} == null ? “Something"Something" : $F{field} == “SomethingElse” "SomethingElse" ? “Something Else“ "Something Else" : $F{field}
{{note| The type of field is important (string, float, double, int, date). Stick with strings if you can.}}
Example:
$F{blockWater} == null ? “No "No value" : $F{blockWater}
{{NavBox HowTo Standardizing Data Analysis and Information Reporting}}
[[Category:VIENAA]]
6,632
edits

Navigation menu