mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/


How to enable Total Level Calculations in Servlet Reports

Total Level Calculations are performed at the Subtotal and Grand Total Level of the report. To compute the average, you will have to edit the HTML skeleton – but don’t worry with mrc and m-Painter, it is a simple process!

 

Supported Operands

You are not limited to just computing averages in a Total Level Calculation, here are the supported operands:

          Add (+)

          Subtract (-)

          Multiply (*)

          Divide (/)

          Remainder (%)

          Exponents (^)

 

Building the Report

1) Build and Compile your report as you normally would. Be sure to add in your calculation that will compute the averages within the mrc application.

2) Rather than running your application, click the Painter palette on the “Manage Reports” screen

3) Click the “Source” button at the top left corner of the Painter Toolbar.

4) Assuming you are replacing a grand total level, scroll down until you see

 

<!-- BEGIN_GRAND_LEVEL -->.

 

 

5) Locate F_G_TN_[CALCULA001] and delete it from the screen. This is the value of the averages summed. You are not interested in this value.

6) In the very same location, enter the following syntax:

F_EXPR[a,b,c] = F_G_TN_[VALUE1]/F_G_TN_[VALUE2];

F_EXPR – prefix string indicate a calculation definition

; - end delimiter of calculation definition (very important, is required!).

a – max length of this calculated value, the default is 12.

b – number of decimal positions for calculated value, the default is 2.

c – either an edit code character or pattern string for formatting, the default is O or #,###.##

 

 

7) Click the save button and run your application.

Other Important Things to Reference:

Grand Level for a column:

F_G_TN_fieldname            -- Grand Total

F_G_AN_fieldname           -- Grand Average

F_S_TN_fieldname            -- Last subtotal level

F_S_AN_fieldname            -- Last subtotal average

F_V_TN_fieldname            -- Last record value

Sub Level for a column:

F_G_TV_fieldname            -- Grand Total

F_G_AV_fieldname           -- Grand Average

F_S_TV_fieldname            -- Subtotal

F_S_AV_fieldname            -- Subtotal average

F_V_TV_fieldname            -- Last record value