The textReport.getLineNumber() function returns the current line number. The text report engine resets the line number to 1 at the top of each page.
textReport.getLineNumber()
returns (result INT)
In the following example, currentLine contains the number of the line that is being printed on the current page:
myReport TextReport = new TextReport();
currentLine INT;
...
currentLine = myReport.getLineNumber();