Adding a formula to a report
In this recipe, we will guide you through the steps required to add a simple formula to your reports. Adding a formula to a report can help you do things that might not be possible to do directly in your query. They can also help with other cool features such as conditional formatting. A formula in Pentaho Report Designer is similar to a formula in an Excel document. If you understand Excel, then this section will be easy for you!
Getting ready
To get ready for this recipe, you will have to make sure your MongoDB instance is running.
How to do it…
We will start off by loading a report that was created in an earlier recipe. Don't worry if you never completed the recipe, as we have a copy of it. Perform the following steps:
Go to File | Open.
Navigate the file system to find the
chatpter5-orders-report.prpt
file. (This file is provided as source code along with this book.)Click on Preview to get the following screenshot:
You should be looking at a simple report that lists...