Time for action – using functions to configure styles
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 isfalse
, it will retain the current style.Note
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...