-
Book Overview & Buying
-
Table Of Contents
Pentaho 5.0 Reporting by Example: Beginner's Guide
By :
We will now create a function to obtain the maximum value for sum_amount present in our report. We will then use the said value to obtain its corresponding customer and apply a bold style onto it.
In the Summary category, we will create a new function Maximum and configure the following:
Functi
on Name = MaxSumAmount
Field Name = sum_amount
Now we will select the Message object we placed in the Details section of our report and configure the following:
S
tyle.bold: =IF([sum_amount]=[MaxSumAmount];"true";"false")
This formula will analyze row by row if the current value of sum_amount equals MaxSumAmount (the maximum value for sum_amount). If such a condition is true, the name of the customer shall be put in bold, if it is false, it will retain the current style.
In later chapters, we will discuss greater detail the definition of formulas.
If we now perform a preview on our report, we will be able to see how the style for the customer...
Change the font size
Change margin width
Change background colour