Print trailer only on last page

Author: marco.aquino@dedalus.eu (Marco)

Hi, I need to print the trailer frame only on the last page. It is possible to do? I try with return -1 on the FGF but doesn't work. Edit: I use uniface 8.4 Thanks in advance Marco

4 Comments

  1. Paint a field in the trailer and popualte it only on the "last" page.

    OR

    use a breakframe and calculate how many lines have to be skipped to position it at the bottom.


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. Thanks,  I will try the suggestion.

     

    Marco


    Author: Marco (marco.aquino@dedalus.eu)
  3. ... to detect the "LAST" event, you have to check in the "Leave printed occurence" trigger $result of the "compare/next (whateverfield)" is  -1

     

    Description
    The compare statement compares the contents of fields listed in FieldList with the corresponding fields in the next or previous occurrence. The compare statement first formats the data in the listed fields before comparing them. This allows the assignment to be done in Proc code without a compare error occurring.

    The following example shows the use of the compare statement:

    ; trigger: Leave Printed Occurrence

    compare/next (INVDATE) from "INVOICE"
    if ($result <= 0)
       printbreak "SUBTOTAL"
       if ($result = 0)
          eject
          printbreak "TITLE"
       endif
    endif
     

    In addition, check "Proc for Printing and Reports" in the helpfile "Programming in Uniface" => "Printing from Uniface"


    Author: ulrich-merkel (ulrichmerkel@web.de)
  4. My situation was composed of a main entity with 1 record and an entity's internal details.
    I solved the problem by deleting the TRAILER and entering his fields at the end of the main entity.
    In this way the fields are printed just fine.

    Thanks to all

     

    Marco


    Author: Marco (marco.aquino@dedalus.eu)