Print commnet lines in Purchase Invoice Header section

I have on Purchase invoice lines 2 lines, not sequencial with some comments,

Ex: AAAAAA on line 1

XXXXXX on line 4

I need to print this information on my Purchase Invoice Header report.

How can I do That?


Take Data Item Purch. Comment Line in your report. and then print


This is not a standard comment line. This is a simple line with empty data Type, in Purchase Invoice Line, that I am usig for keep some invoive lines information.

I need to print that 2 lines, that have only Description field with some Text information, on Invoice Header report layout.


Any idear for this issue??

I found a solution, but the variable GT only keeps the first description. How can I keep, al the description tht wiil be found on this filter?

If I have 3 descrptions, should be: GT= Desc1;Desc2;Desc3

How can I do That?

My solution:


Purch. Inv. Header - OnAfterGetRecord()
CLEAR(“Purch. Inv. Line”);

IF “No.” <> ‘’ THEN BEGIN
“Purch. Inv. Line”.INIT;

“Purch. Inv. Line”.SETFILTER(“Purch. Inv. Line”.“Document No.”,“No.”);
“Purch. Inv. Line”.SETFILTER(“Purch. Inv. Line”.Description,’<>%1’,“Purch. Inv. Line”.Description);

IF “Purch. Inv. Line”.“No.” = ‘’ THEN

GT := “Purch. Inv. Line”.Description;
UNTIL “Purch. Inv. Line”.NEXT = 0

GT := ‘’;

I am trying to use the array dunction, but I am getting some problems

Ehen I define

GT[i] .= “Purch. Inv. Line”.Description I get one error message:

This prefix operator cannot be used on Text

Why this error message??

My Gt variable has DataType = Text

I tested your code and I did not receive the error you mentined! However as you said it only read the first description because you are not adding the subsequet descriptions to your variable! So you may amend your code as follows:

GT := GT + “Purch. Inv. Line”.Description

If you want a (:wink: seperator then use following code:

GT := GT + “Purch. Inv. Line”.Description + ‘;’

At the end, when you have read all the descriptions, you can remove the last extra (:wink: like this:


By the way, be cautious of the size of your GT variable.

Thanks Jay, your suggest was verry useful, thanks