Aggregation functions

So far, we have introduced two functions into our report:

  • ProductCounter: This performs a cumulative count on the rows in the Details section. This function belongs to the Running category.
  • SumQty: This performs a cumulative count on the sum_amount fields of the rows present in the Details section. This function also belongs to the Running category.

Every function in the Running category performs calculations, sum, counts, and so on in a cumulative fashion, that is, they take into consideration the values obtained on previous pages. For example, the Count function appearing on the first page performs a count of the rows of the said page, from the second page on it will add the current page count to the total count of the previous one. In the same way, the functions Maximum and Minimum, when applied to the first page only take into consideration the minimum and maximum values, respectively, as shown on the first page. In the following pages, they will only update these values if a bigger or lesser value is to be found on the current page, otherwise they will remain the same.

In the Summary category, we will find functions that perform calculations on a per page or total basis. In this category, the Count function will count the total number of rows present in our whole report. Something similar applies to the Maximum and Minimum functions, the maximum and minimum values are calculated only once, taking into consideration every row in our report. The functions Count for Page and Sum for Page perform these calculations for every page, that is, the first one counts the row present in every page, and the second one performs a sum of the values present in every page.

Inside the Common category, we will find functions used to manage the pages of our report: Page, Total Page Count, and Page of Pages. Within this category, we will also find Open Formula, which allows the introduction of more complex calculations and provides a very powerful and useful Formula Editor. This editor is the same one we see when we click on the Aggregation functions button on the Attributes and/or Style options of an object.

Note

Later we will talk in detail about Open Formula.

Another function that is very commonly used is Row Banding under the Report category, which is the one we have used on our reports to color the rows in an interleaved fashion. If we take the time to explore the rest of the categories and functions, we will find a great amount of them, each one with a specific mission.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset