Insert Totals & Percentages

Over the course of your application building and design, it is possible you may want to use a total or percentage that was calculated in a separate report and use it in your current application. A use case of this could be that you have a list of customers in a retrieval and wish to show their lifetime sales. This documentation will walk you through this specific use case.

While this use case illustrates the use in a retrieval, you can utilize any application type, including another report.

Build Report that will be used for Totaling

Ultimately we need to bring in some total values, by customer. So I’m going to build a Regular Report template, choosing only the customer # and total sales. I will set the customer # as the sole dimension and subtotal. The report it self should be set as as summary report. After that, build the report. No other customization needs to be done to this application. Make note of this report # as we will use it shortly.

Build Parent Retrieval

Next, build a standard Multiple Row Data List over your Customer table. Once built, open m-Painter.

Add New Column

Click within the right most column, then click the “+ Column Right button” in the element panel.

Insert Total Value

Next, click inside the empty cell, then, in the left hand UI and Data Options panel, choose Retrieve Additional Data and select “Insert Totals & Percentages”

The popup dialog will ask you where would you like your total to come from. For this example, click “Existing m-Power Application” and click “Next.”

Next, select the Report you created earlier. Once selected, you will be brought to a screen that looks like this:

Configure Total Value

Pay close attention to the “Map fields from the parent application to the application to filter the data.” It is in this section that you are specifying what parameter(s) you wish to pass between the applications to render the proper data. In this case, I will select the Customer # from both dropdowns and click “Next.”

Finally, you will brought to the configuration screen where you can choose whether you want to render a total value or a percentage. In my case, I want to render a total. I then select which field I want totaled in the dropdown list. When does click Finish.

In m-Painter, I can see that my once empty cell has been populated with a new substitution. Press Save to save all changes and run your application.

Runtime Example

At runtime, I can see that my m-Power application is now getting the grand total value in my report for each customer row found in my retrieval.

Updated on November 28, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support