Time for action – configuring the Details Footer section
Next, we will configure the Details Footer section as seen here:
- We will make the Details Footer section visible in our report. The Details Footer section is commonly used to place a summary of what was seen in Details.
- Go to the Structure tab, and in the hierarchical tree, navigate to Master Report | Group: | Details Body | Details Footer. Then configure Attributes.hide-on-canvas with the value false:
- We will add the following two labels in the work area of this section:
Total Articles:
Total Sales:
- And we will set the following value for both of them:
- Style.bold =
true
- Style.bold =
- Next, we will create a function to count the rows, in this case, of the products sold.
We create the
Count (Running)
function, found in the Running category, and configure it with the following characteristic:- Function name =
ProductCounter
Note
The functions that include the word
Running
as part of their name tell us that they are executed as the data is processed, that is, on the fly. In this case,Count (Running)
will count the report's rows as they are presented in the Details section of each page. - Function name =
- Similarly to the previous step, we create a function that will take a sum of the sales made.
We create the
Sum (Running)
function, found in the Running category, and configure it with the following characteristics:- Function name =
SumQty
- Field name =
Quantity
Note
In this case,
Sum (Running)
will take a sum of theQuantity
field as the data is presented in the Details section of each page. - Function name =
- Now we place the two recently created functions to the right of the label that corresponds to each, that is, we will place
ProductCounter
to the right of the first label andSumQty
to the right of the second label.Let's consider, when we are laying out the report, that an object we have inserted becomes red; refer to the following example:
This indicates that this object is superimposed on another object and that it is possible that when the report is executed, this object will not be viewable normally. In these cases, we should arrange and resize the objects so that none are superimposed.
- We copy the horizontal line () created earlier by pressing the icon. We select the Details Footer section and paste the horizontal line by pressing the icon. Then we position it in the upper part of this section.
- We see what the report looks like at this point. Press the preview button. We should obtain the following result:
What just happened?
We customized our report's Details Footer section. We created and added two functions, one to calculate the quantity of articles sold and another to calculate the sum of the sales.