mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/
|
|
Total Level Calculations (Web 2.0Reports)
This feature is ideal for those customers who wish to calculate % of Grand Total (or subtotal) within a report.
To learn how to Reference a Grand total anywhere within the page, please click here.
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 percentage of the grand total does each product account.
First, we will need to build our report, being sure to utilize the “Web 2.0 Report” template.

Once the report is compiled, open the report within m-Painter.

Next, click the “Application Defaults” button.

The last option, under the Program Options tab, is “edit_type.” Change the “edit_type” to “Text Editing Only.” Click the “OK” button. Note: This step is needed as the added flexibility with m-Painter is, at times, not compatible with certain fields.
A “pop-up” window will be displayed. Hit “OK.”
Change the “Page” drop down to list your property file (RXXXXXp.xml):
![]()
Next, click on the Application Properties button, and select “Text editing only.” This makes your change permanent.
![]()
Click OK. Then click the “Save and Deploy” button.
Change the “Page” drop down list back to the HTML output
![]()
Look for the text “<!-- BEGIN_GRAND_LEVEL -->”. This level is displayed below.

Whereas the Classic template had you utilize an F_EXPR text to compute a grand line total, the syntax has been modified for ease:
“<@calc> EXPR[9,2,J]= ${grandTotal.OPBAL_o} / ${grandTotal.MTDUP_o} * 100; </@calc>.%”
The <@calc> and </@calc> tell the servlet that a total level calculation is beginning and ending, respectively.
The EXPR[9,2,J] tells the servlet to perform a mathematical expression, creating a logical field that is length 9, with 2 decimal places.
The actual equation is the sum of all Opening Balance for the grand total divided by the sum of all Month to Date Units Sold. Notice that “_o” had been added to each expression. This removes an edit codes that may have been on this field. This is required for fields that may have negative values.
Note: The trailing “;” is required.
Lastly, after the trailing </@calc> a “%” was added to denote percentage.

Hit the “Save and Deploy Icon.”
At run time, my grand-total output would look similar to this:
