Follow these steps to modify functions and page breaks:
GroupCountry
true
We configured the functions of our report to correctly perform their calculations on a per-group basis, and then configured the Group section so that each new country begins on a different page.
A basic requirement for creating groups is that the data set should be ordered according to the criteria that will be used to create the groups. This is why our SQL query contains the statement ORDER BY country.country
.
If our data set were not ordered by country
, we could end up with a data set like the following:
In this case, PRD would create the following groups:
This is because PRD creates a new group when the value of the grouping criteria changes.
PRD also provides a UI to manage groups. To access the UI, go to the Structure tab, right-click on the Group node, and select the Edit Group... option.
The following fields will appear:
The buttons are used to move different grouping criteria up or down in the hierarchy.
If we need to create a group with more than one grouping criteria, for example, country and city, we should configure our group as follows:
Now that this chapter is finished, we will invite you to create your own report, in which you will be able to apply some of the things we have seen so far. The first page of the report we are inviting you to create should look like the following:
And the second page of the report should look like this:
The steps you should be roughly following are as follows:
06_Adding_Groups_Plus.prpt
.SELECT LEFT(customer.last_name,1) as letter, CONCAT(customer.last_name,', ',customer.first_name) as customer_name, LCASE(customer.email) as email FROM customer ORDER BY letter
letter
fields.Q1. Which of the following affirmations are true?