Reader small image

You're reading from  Pentaho 5.0 Reporting by Example: Beginner's Guide

Product typeBook
Published inAug 2013
PublisherPackt
ISBN-139781782162247
Edition1st Edition
Tools
Right arrow
Author (1)
Right arrow

Time for action – creating a new report


We will create a new report from scratch. In order to do this, we will need to create the report itself, then create a JDBC-type data set and establish its SQL query. Finally, we will create a general layout, which means we will need to add to our report a series of objects and configure them properly.

  1. We will create a new report and save it under the name, 07_Adding_Parameters.prpt.

  2. We will create the following layout for our report:

  3. At this stage, we need to create a JDBC-type data set, establish the connection with our sakila database, and then create the following query:

    SELECT film.rating, film.title, 
    SUM(payment.amount) AS sum_amount, COUNT(1)  AS count_rental
    FROM payment
    INNER JOIN rental ON rental.rental_id=payment.rental_id
    INNER JOIN inventory ON inventory.inventory_id=rental.inventory_id
    INNER JOIN film ON film.film_id=inventory.film_id
    WHERE film.rating IN ('G','PG','PG-13','R','NC-17')
    AND YEAR(payment.payment_date) = 2005
    AND MONTH(payment_date...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Pentaho 5.0 Reporting by Example: Beginner's Guide
Published in: Aug 2013Publisher: PacktISBN-13: 9781782162247