Write Row hook - Infor Reporting only

You can use this hook in these situations:

  • Writing additional rows to the XML file.
  • Calculating values for Calculated Fields.

The Write Row hook is executed before the standard row is written to the XML file. If the standard row must be written before the hook is executed, you can force the standard row being written anytime you prefer. This can be achieved by calling the report.super() function.

Example:

function extern void write.row()
{
        ext.alternative = tcyesno.no
        report.super()
        ext.alternative = tcyesno.yes
        select  tcibd005.*
        from    tcibd005
        where   tcibd005.item = :tdpur401.item
        selectdo
                rpi.write.additional.row()
        endselect
}

In this example there is also an ext.alternative Calculated Field. To filter to distinguish the standard rows and the additional rows in the Infor Reporting design, this field is added. It must have the value no for the standard rows and value yes for the additional rows. The additional rows are written for each record found in tcibd005 for the current Item.

For tcibd005 there must be a Table Selection to select the individual fields, but that Table Selection does not require a Table Read hook. The ext.alternative Calculated Field does not require a Calculate Value hook, because the value is calculated here.