→Fields, Variables, and Parameters
Often it is necessary to add a variable to an iReport template. Variables are used to store calculations and totals in an iReport template. They are often used in the Summary Band portion of a report to store sums of numeric fields (e.g. areaSize) or record counts. There are two main ways to add variables to an iReport template.
For numeric variables
For variables that are numeric (area sizes, number of devices, etc):
# From the '''Report Inspector''', Select the field that you wish to sum or count.
#: [[Image:IReport VariableAdd2.png|center|300px|''Select aggregation function'']]<div align="center">''Choose the type of calculation''</div>
# From the '''Report Inspector''' '''right click''' on the '''Variable''' tree and choose '''Add Variable'''.
#: [[Image:IReport VariableAdd3.png|center|300px|''Add Variable'']]<div align="center">''Add Variable''</div>