Time for action – creating our first sparkline
We will modify our principal data set to practice each of the following points. We will create a subreport, and within it we will create and configure two sparklines.
We modify the SQL query of our data set to conform to the needs of this guide. We add the field
customer_id
at the end of the list of fields in theSELECT
statement. Our query should look like the following:SELECT country.country_id, country.country, customer.first_name,customer.last_name, SUM(payment.amount) sum_amount, payment.customer_id FROM payment INNER JOIN customer ON customer.customer_id=payment.customer_id INNER JOIN address ON address.address_id=customer.address_id INNER JOIN city ON city.city_id=address.city_id INNER JOIN country ON country.country_id=city.country_id WHERE country.country_id IN (20,24,29,34,48,67,74) GROUP BY payment.customer_id ORDER BY country.country, customer.first_name
In the Details section, beside the label Trend, we place a...