Detail Lines & Group Footers

Michael Certini
Michael Certini Altair Community Member
edited September 2023 in Community Q&A

Hi Forum Members,

In creating a parsing program for a text based report from Oracle, I have created two parsing templates.  The detail template has an associated group footer template connected to it.  The detail template is working great in that it is capturing all of the detail records properly.  I though am having problems with an associated group footer.  When a detail record has a group footer record available, the group record appends to the end of the detail record properly.  But when a group record is not available, the detail record pickups up and appends the next available group record.  The following is an example of the records:

I am using Monarch 18.1

Data Layout

Record#1                         Detail Field#1, Detail Field#2, Detail Field#3, Detail Field#4

Group Foot#1, Group Foot#2, Group Foot#3

Group Foot#4, Group Foot#5, Group Foot#6

Record#2                         Detail Field#1, Detail Field#2, Detail Field#3, Detail Field#4

Record#3                         Detail Field#1, Detail Field#2, Detail Field#3, Detail Field#4

Group Foot#1, Group Foot#2, Group Foot#3

Group Foot#4, Group Foot#5, Group Foot#6

Parsing Results

The good record (#1):  Detail Field#1, Detail Field#2, Detail Field#3, Detail Field#4, Group Foot#1, Group Foot#2, Group Foot#3, Group Foot#4, etc....

The bad record (#2):  Detail Field#1, Detail Field#3, Detail Field#3, Detail Field#4, (Record#3) Group Foot#1, (Record#3) Group Foot#2, etc.....

 

How do I get the detail template to skip over the group footer when there is no group footer for it?

 

Tagged:

Answers

  • Nicholas_21406
    Nicholas_21406
    Altair Employee
    edited September 2023

    Hi Michael,

    Could you please attach your input file and your .dmod model file?

    Thanks!

  • CPorthouse
    CPorthouse
    Altair Employee
    edited September 2023

    This is the default behavior of a group footer template.  A group footer will attach to all detail records above it until

    1. It comes across another match of the same group footer template.
    2. It reaches the top of the file.
    3. It is stopped by a clearing template.

    Option #3 is what you what to look at.  In report design, look for a button above the trap line of your group footer template called "Clearing Template".  It provide a drop down list of available templates.  If you want the group footer to only apply to one detail record, select "Detail" template from the list.  You can only select one clearing template per template.

    FYI...the append template has the same behavior as the group footer except that it attaches to detail records below the append template going down the report and will stop at the end of the file.

    You can find more information here: https://help.altair.com/monarch/help/Template_Editor_Action_Bar.htm