Sometimes report elements can have the same value over and over. For example, the report we created in the Grouping Report Data section is sorted by model number. For aircraft with the same model, we see the model number repeated over and over again. Perhaps, the report would be easier to read if we printed the model number only when it is different from the previous one. This will improve report readability, since the person reading the report would not have to look at the model number unless it is different from the previous one. In the following example, we will modify the JRXML template discussed in that section to accomplish this:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN" "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"> <jasperReport name="IsPrintRepeatedValuesDemo"> <queryString> <![CDATA[select a.tail_num...