Appending extra text at start of each text line on report
In Baan 5.0, we have developed a new Baan report. One of the report layouts contains a text field (field tdpur400.txta) that is an input field to the report.
We need to append certain characters to the start of each text line (for the purposes of our document presentation software), and this is achieved by the following code in the report script:
lattr.textexpand = TRUE
lattr.prline(6) = lattr.prline(1)
lattr.prline(1;5) = "htxt "
The result of this is that, for example, if the text field tdpur400.txta contains the following:
"Text line 1
Text line 2
Text line 3"
then this field is output on the report as:
htxt Text line 1
htxt Text line 2
htxt Text line 3
This does exactly what we need. However, we need to achieve the same result with another text field (tdsls400.txtb) that is NOT an input field for the report but is instead retrieved from within the report script. (Unfortunately it is not an option to retrieve the field in the program script and make it an input field to the report).
I would be very grateful for any code that we can put in the report script that allows us to 'format' the text field so we can add in the required characters at the start of each line for the report.