Runtime Calculations are ideal for customers who wish to perform calculations like averages at the Subtotal Level, or finding a percent of a of Grand Total. For instance, let's say that we would like to pull up a list of Products and see their Month to Date units sold. I would also like to know, based upon the grand total of all units sold, what is the profit margin for all sales on the grand total level.
First, we will need to build our report, being sure to utilize the Report template.
Once the report is compiled, open the report within m-Painter.
Insert your cursor into the field where you would like to output the Grand Total (or subtotal) calculation. In this example it will be the lower right cell.
Click the "Calc" icon in the top toolbar. You should then see the below window:
To create your calculation, choose your fields from the dropdown selection on the right. Be sure to select the appropriate output level (Grand Total or Subtotal). Click "Add" to add each field to the calculation expression and insert your desired arithmetic. Give the calculation an appropriate length and edit code and press "OK".
Hit the "Save and Deploy" icon.
At run time, my grand-total output would look similar to this:
Our runtime calculation has calculated a profit of 79.66%.