Next, we will create a new report, create its data set, and add a crosstab. Then we will configure the crosstab to show us the values of amount
analyzed after crossing years-months
with ratings
.
sakila db
DateRatingAmount
SELECT YEAR(payment.payment_date) AS payment_year, MONTH(payment.payment_date) AS payment_month, film.rating, SUM(payment.amount) AS sum_amount 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","R") payment_year, payment_month, film_rating
Year
and Month
, respectively.Ratings
.sum_amount
, and choose the Aggregation criteria as sum
.We created a new report and named it 18_Adding_Crosstabs.prpt
. Then we created its JDBC data set and established its SQL query. We added a crosstab to the Report Header section, made it be Inline, and established its data set. Then we configured the sections Row Axis, Column Axis, and Data Cell for the crosstab.
In this chapter we propose that you hide a graphic if the user executing the report is not Admin
.
The steps you should follow, broadly speaking, are:
11_Adding_Graphics.prpt
and save it with the name 19_Adding_Style_Sheets_Plus.prpt
.True
if the user currently logged in is Admin
, and return False
otherwise.Which of the following statements are true?:
Q1. PRD's environment variables let us know some information about the BA Server where the report is being executed.
Q2. In order for PRD to include the values of the environment variables, they must be previously enabled.
Q3. PRD uses CSS3 to implement stylesheets.
Q4. We can manually create our .prptstyle file and then include it using PRD.
Q5. In stylesheets, we can create CSS Rules only if we know the class or ID of the object in question.
Q6. Crosstabs in PRD function dynamically when executed in Pentaho BA Server.