Hi
I hope someone can help with this as it's driving me insane! I've spent the last three days searching for answers and trying out different ideas none of which have worked.
The following code builds up the required information for a single mail merge field that is then repeated for multiple lines. This all works as expected however once output (ultimately as a pdf) it doesn't hold to the substring length I have used. I've also tried overlay and that was the same result.
Here's the relevant piece of code...
The result I get (approximately) is:
(I've used full stops to represent spacing)
Kitchen..........Sink Pad or Coating..............Chrys..........Low.........Sink pad
Unknown Room..........Ceiling................Chrys..........Low..........Ceiling
Unknown Room..........Floor Tiles..........Chrys..........Low..........Floor
Kitchen..........Floor Tile and Adhesive........None Detected........VeryLow ..........Beige
Kitchen..........Sink Pad or Coating.......... None Detected..........Very Low...........Sink pad
...which is a mess.
If I replace the tt items with simple text then it spaces correctly, so does this mean it's there are characters that I'm retrieving that the Trim function isn't recognising as spaces so not trimming?
Any assistance will be gratefully received.
Cheers
Tony
I hope someone can help with this as it's driving me insane! I've spent the last three days searching for answers and trying out different ideas none of which have worked.
The following code builds up the required information for a single mail merge field that is then repeated for multiple lines. This all works as expected however once output (ultimately as a pdf) it doesn't hold to the substring length I have used. I've also tried overlay and that was the same result.
Here's the relevant piece of code...
Code:
FOR EACH tt-hdr:
ASSIGN lv-line-no = 0.
for each tt-dtl WHERE tt-dtl.place-ref = tt-hdr.place-ref
use-index idx1:
ASSIGN lv-line-no = lv-line-no + 1.
ASSIGN lv-asb-line = "".
ASSIGN substring(lv-asb-line,1,30) = trim(substring(tt-dtl.sub-loc-desc,1,30)).
ASSIGN substring(lv-asb-line,32,30) = trim(substring(tt-dtl.comp-desc,1,30)).
ASSIGN substring(lv-asb-line,64,30) = trim(substring(tt-dtl.type-desc,1,30)).
ASSIGN substring(lv-asb-line,96,20) = trim(substring(tt-dtl.risk-desc,1,20)).
ASSIGN substring(lv-asb-line,118,10) = trim(substring(tt-dtl.notes,1,10)).
ASSIGN tt-hdr.Asbestos-lines = IF tt-hdr.Asbestos-lines = " " THEN lv-asb-line ELSE tt-hdr.Asbestos-lines + chr(11) + lv-asb-line.
end. /*dtl*/
(I've used full stops to represent spacing)
Kitchen..........Sink Pad or Coating..............Chrys..........Low.........Sink pad
Unknown Room..........Ceiling................Chrys..........Low..........Ceiling
Unknown Room..........Floor Tiles..........Chrys..........Low..........Floor
Kitchen..........Floor Tile and Adhesive........None Detected........VeryLow ..........Beige
Kitchen..........Sink Pad or Coating.......... None Detected..........Very Low...........Sink pad
...which is a mess.
If I replace the tt items with simple text then it spaces correctly, so does this mean it's there are characters that I'm retrieving that the Trim function isn't recognising as spaces so not trimming?
Any assistance will be gratefully received.
Cheers
Tony
Last edited by a moderator: