mrc Documentation
michaels, ross & cole, ltd.
http://www.mrc-productivity.com/
|
|
Utilizing Subtotal Header Rows within Web 2.0 Reports
This feature allows you to print information on every
subtotal break – great for listing header information, for instance, just once
for their subtotal break within the row.
Build your report and be sure to select the “Web 2.0 Report” Template.

Once your application is built, be sure to open it with m-Painter and click the “Source” view.

While you do not need to know HTML to edit our servlets, there are times you need to enter the source code for more advanced options. mrc provides much “English” text to help find your way. Search, either by scrolling or by the binoculars, for the BEGIN_DETAIL_LEVEL text. The section needed is seen below:

We need to add text that will allow the servlet to add additional header information, but only if the next row is the beginning of a new subtotal section. See the red box below:

The text that was added was:
<!--<#if row_index=0>-->
<tr>
<td colspan=3> *** Customer Name ${row.CNAME} *** </td>
</tr>
<!--</#if>-->
The explanation for the code follows:
Once you save your Painting by clicking “Save and Deploy.” Your output will resemble this:

Notice that for each subtotal section a brand new row was created with a data cell that was 3 columns wide. Inside each cell was the text included from within the logic. Also notice that this text is only seen at the beginning of each subtotal section.