Creating a Pentaho report directly from PDI
Reports are usually very useful when they are processed as needed for given parameters. Sometimes those parameters are dynamically generated at runtime and are not necessarily known to a user. For this recipe, we will be using the built-in functionality of PDI to process the report created in the previous recipe to find the current weather for a given set of cities.
Getting ready
Before continuing this exercise, you will need the forecast.prpt
report created in the last recipe. This can be obtained either through Packt's website or by creating the report as per the previous recipe in this chapter.
How to do it...
Follow the steps to generate reports within PDI:
Create a new transformation.
Add Data Grid to the canvas from the pallet. Add two fields:
city
, type:String
scale
, type:String
On the Data tab, add a few cities and a scale of either
C
orF
.Add an Add constants step to the canvas. There will be one field in this step:
Name:
report_file
Type:
String...