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!
To get ready for this recipe, you will have to make sure your MongoDB instance is running.
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.prptfile. (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...