I had a feeling of Deja Vu but wondered if I could find the code … then I checked PTTS and found 41838.
My code took the Report Text() and extracted the lines using PROP:Line, the code printed those lines individually as a Detail with a STRING. You would have to do that to use the workaround I described:
- Append sacrifice text “!!! !!! !!!” but use chr(161) the upside down !!!
- Extra each TEXT lines using Prop:LineCount Prop:line,#.
- Spot the chr(161) and remove.
- Spot the 13,10 and break
- Take that single line and output using a STRING()
Here is my PTTS 41838 …
TEXT on Report truncates last word on some printers – Word wrap bug? Bad!
Report with TEXT when word wrapped will truncate all or part of the last word on some printers. This code under C5 has run perfectly for 10 years. Arnor reports his Report was fine under C5.5. Tests in C8,9,10 show they are all broken. Discuss report says C6.3 broken. So if it can work right under C5 and C5.5 it should be fixed to work under C10.
The main printer I see it for is HP OfficeJet Pro 8620. I would guess also for 8610 and 8630 as they use the same driver. I have also seen it happen on a “Dell B2360 D-DN Laser Printer Xl” but for different words.
I have also seen bug truncate the last word on a middle line if there are 13,10s creating multiple lines. And have seen a middle 13,10 not causing a word-wrap line break. Examples of both in attachment.
It’s not a paint issue. When I extract the lines from the TEXT control using PROP:Line,# the text is exactly as displayed with words truncated, or 13,10 in the line text.
My attached example report is very simple and uses a simple preview:
Measure:Text STRING(4000)
Measure:Report REPORT,AT(500,500,7000,10000),PRE(MesRPT),FONT('Arial',9),THOUS ,PREVIEW(PreviewQ)
Measure:DetailText DETAIL,USE(?MesRPT:Measure:DetailText)
TEXT,AT(0,0,1000,),USE(Measure:Text),FONT('Arial',9),RESIZE
END
41838_Ptts_Text_Trunc.zip (158.1 KB)