Formulas are a powerful mechanism in Pentaho Reporting to change report objects' properties dynamically at runtime. This recipe will show how we can set the cell's background color depending on the satisfaction of a specific business condition. Specifically, as a simple example, this recipe uses a formula to apply the following rules:
Set a red background to the Store Sales table's column cells whenever the sales amount for a specific cell is less than $200
Set a green background to the Store Sales table's column cells whenever the sales amount is greater than $700
The following steps detail how we can use formulas to change report objects' properties dynamically at runtime:
From the Pentaho Report Designer menu, select the Open option under the File menu. The Open file dialog box opens. Go to the
<cookbook_samples>/ch07/resources
directory and choose...