Report text field with resize not showing all of text field

Hi,

I have a report using word wrapping on a text field with the RESIZE option. The text wraps to 3 lines. The third line is not shown on some machines. A blank space is shown where the 3rd line text should be shown when the error occurs.

Same standalone exe run on different boxes. I think this rules out different runtime dlls.

If I add additional text to the string the third line shows up on all tested machines.

report line 1:
Certified in accordance with the AAAA BBB Certification Program, which is based on

report line 2:
AAA Standard 0000. Certified units may be found in the AAAA Directory at

report line 3: (win 10 shows text correctly, win 8.1 shows a blank line in error)
www.aaaadirectory.org.

report line 3 test case: (works on all test machines)
www.aaaadirectory.org yes yes yes.

Are you sure you have default printers setup on the machines that fail?

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:

  1. Append sacrifice text “!!! !!! !!!” but use chr(161) the upside down !!!
  2. Extra each TEXT lines using Prop:LineCount Prop:line,#.
  3. Spot the chr(161) and remove.
  4. Spot the 13,10 and break
  5. 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)

I wonder if it’s possible that the printable area of your printer is exceeded by the report dimensions on some machines.

Thanks. How old is the bug report?

I just looked at the file date times. 2015.

PTTS was September 24, 2015. Notes say the bug was confirmed in 6.3, 8, 9, 9.1 and 10. There is no status change or activity on the PTTS so likely not seen. At times PTTS has not been monitored.

It was reported sv.clarion.clarion10 - Subject: TEXT on report cuts off text From: Arnor Baldvinsson Wed, Jun 10 2015 9:03 pm.

I just checked Discuss C1 and I see no newer posts or fix. Several people reported. I think HP driver was in most or all posts.

Thanks. Too bad it was not fixed earlier. Even if root cause is a driver bug, it impacts all of us.

“Just get a new different printer” doesn’t go over so well with most people.

1 Like

I posted in the original Discuss C10 thread to see if there were any new ideas.

One thought would be to append 2 or 3 words composed of Hard Spaces which I think is CHR(160) or A0h. You might end up with an extra blank line but at leastit will not be missing words. Maybe only do it if there is more than one line::

IF Report$?MyText{PROP:LineCount} > 1 THEN 
   MyText = CLIP(MyText) &'<32><160>{5}<32><160>{5}'  !Space + 5 Hard Spaces
END
1 Like