Skip to Content
0

Word wrap cutting off right edge of character

Mar 27 at 10:09 PM

46

avatar image

Hi, I have a simple report with just a Text Object that has Can Grow set. If the contents of the text box is long enough that it needs to wrap, Crystal may decide to try to fit an extra word on the line that doesn't actually fit, which cuts off the right edge of the character:

The text in the box is:

TRAPEZOIDAL ROUTER DIAM. 
10MM FOR 10MM GLASS U=7MM 1/2"GAS 230 GRIT

I'd expect it to put "230 GRIT" on the 3rd line, instead of trying to fit "230" at the end of the second line.

This seems to be related to the "No Printer (optimize for screen display)" checkbox in Crystal Reports -> Design -> Page Setup; I only see the problem if it's checked. If I uncheck that box, "230 GRIT" goes on the 3rd line as expected. It also seems to be related to the Windows DPI scaling setting. On my laptop that's set to 200% scaling (192 dpi), it wraps properly even when "No Printer" is checked. But on my desktop at 100% scaling (96 dpi), I see this problem.

The above screenshot is from the report preview in the Visual Studio IDE. If I print or export to PDF by clicking the toolbar buttons there, it prints/exports properly (wraps before "230 GRIT"). However, if I export to PDF from my app (by calling ReportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, ...)), the resulting PDF wraps before "GRIT" and truncates the "0" (see the PDF here).

I've put a copy of the rpt file that shows the problem here.

I see the above behavior with CR for .NET 13.0.19 through 13.0.22.

wrapproblem1.png (10.8 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Don Williams
Mar 28 at 10:32 PM
0
Show 1 Share
10 |10000 characters needed characters left characters exceeded

Google found that KBA at https://apps.support.sap.com/sap/support/knowledge/public/en/2165260

On the one hand, that's a very useful list of configuration options; I knew about some of them, but hadn't seem them collected in one place. Thanks :) But on the other hand, there's a lot of stuff there and I'm not sure which would be applicable to this problem. It doesn't help that a lot of the links to KBAs with more details are broken :(

The Crystal Reports\Export\PDF UsePrecisePositioningForText and TruncationAdjustment settings sound promising, although it sounds like they only affect PDF export, whereas I see a problem when previewing the report on screen and printing directly to a printer too. Of the two KBAs related to those settings, 1435991 gives a 404 error, but 1835763 works. I tried setting UsePrecisePositioningForText to 1 and TruncationAdjustment to 2 as suggested in 1835763, but nothing seems to have changed. I still see the truncated text in the report preview (as I would expect, since those settings are for PDF export), but I also still see the truncated text in the PDF export :( I did have UseLargerFonts set to 1, due to issues with barcode font sizes, but I've removed that, and am still seeing the truncation.

The other setting I saw that seemed like it might be related is Crystal Reports\SavedData TruncateClippedFieldStrings. However, all of the linked KBAs for that are 404 error pages, so I'm not sure if that setting is actually relevant. But I tried setting it to both Yes and No (REG_SZ value), with no change.

Are there other ones I should try?

0
Don Williams
Apr 03 at 04:11 PM
0

Same issue, use Google and search for the KBA number.

If they don't help when previewing in CR then it's due to the version of USP10.dll you are using.

Update CR to the latest version and patches, we use USP10.dll version 1.6 now.

If that doesn't resolve the issue then don't use No Printer, that uses USP10 to format the report, it needs a real printer driver. And not the XPS driver by MS, it has issues also.

Don

Share
10 |10000 characters needed characters left characters exceeded