cancel
Showing results for 
Search instead for 
Did you mean: 

Truncation issues with Crystal Runtime SP26

0 Kudos

Hi there,

When our reports are exported to pdf, in some cases words are being truncated (we use the registry setting forcelargerfonts = 1)

Without forcelargerfonts it doesnt' truncate, but then the font size is not correct. For example a definition with arial 10 comes to arial 9.95 in pdf output.

Is that a known issue ? Can this be fixed in a future CR SP Release ?

Thanks and best regards

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

FYI - this has been fixed with another new registry key and will be available in SP 30 due out in February 2021...

Answers (21)

Answers (21)

Hi Dan,

When printing, Viewing or Exporting a report the formatting component gathers a bunch of info about the PC.

Printers, Default printer specified, printer info saved in the RPT file, when it was created and printer selected when it's created.

So, when exporting the export depends on the printer selected in the report. The best results is to design the reports based on a real printer. But it also depends on the layout of the report.

The part that can affect different outputs is if No Printer is selected when designing reports. Some older Engineers used to recommend using that setting, the problem is when you select that option CR then uses some "default Printer" properties and then it uses USP10.dll and GDI.dll and GDIPLUS.dll for .NET. There are variations in those Windows dll's and they can cause slight variations, as well as if your default printer is for example the MS XPS or PDF printer drivers. They can cause issues and minor variations as well because the format engine will use the page margins when scaling the page.

For more info on how to design reports based on barcodes see this WIKI Ludek an I wrote about printing:

https://blogs.sap.com/2019/05/31/printing-crystal-reports/

So, I am assuming a lot here but uncheck No Printer in Page Setup and select a real printer, if you don't have one use an HP type printer and set the port to LPT1, Check on Dissociate.

I did a lot of work with R&D on printing. It will now look for that custom paper size by name, so anyone printing barcode just has to use the same paper size name and CR will look for it. Notice in CR Designer when you select Print you will see the Printer saved in the report along with the paper size.

So to fix your report, Select a real printer, not the MS XPS or PDF driver, Select a default paper size, check on Dissociate. If you are using a Custom PDF Printer try using a different one or at least download the latest version.

One last question, what version of usp10.dll do you have on your PC? Use search to find them all.

Don

0 Kudos

Hi Dan,

R&D modified a crxf_pdf.dll for you to test. I sent you a message asking you to send me an e-mail so I could get it to you for testing.

Can you check your in-box or junk mail and replay so I can get it to you?

Thanks again

Don

0 Kudos

Thanks Dan... passed it onto the Developers

0 Kudos

Impossible to deliver a production report, because these data sources are to complex.

To simplify and clearify the problem I modified the testreport with a simple data source.

The source delivers dynamic text in column "field". Imagine in production system this could be a text field editable by the user.

Textbox width in Crystal Report would be always the same size.

With 17.725 "Module" get's chopped of.

With 17.826 "Module" would be fine but "lecture" will be truncated.

Of course you could set it now to 17.9, but I'm shure there will be another case in which something will be truncated.

Under the assumption a user would like to print out 1000 page for 1000 persons and the content can change for every person, he would have to control every page.

If something is truncated he would have to create a support ticket. A developer needs to adjust the size. Probably he could print the next 100 records, create a ticket again. And so on...

Imagine this in a multiuser system with much printouts, impossible to make changes in production report without affecting other users.

In "real life" it's not a solution to adjust the width of the text box. Because there will be a lot of reports with tons of textboxes and different dynamic content which comes from various data sources.

I made a simple report using this data source, grouped by "field"

2 textboxes inside detail section, one width: 17.725 and the other 17.826

CREATE VIEW [dbo].[qryCst_Rpt_Testreport]
AS
 

SELECT  
CAST('Die vorläufige Datenabschrift weist Ihre bisherigen, provisorischen Noten sowie die ECTS der absolvierten Module aus.' AS VARCHAR(8000)) field
UNION
SELECT CAST('Some dynamic text, hopefully not truncated...ssss dynamic text, hopefully not truncated... Some dynamic text    ae hopefully not truncated...Some dynamic text, hopefully not truncated...' AS VARCHAR(8000))  
UNION
SELECT CAST('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.' AS VARCHAR(8000))  
UNION
SELECT CAST('It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.' AS VARCHAR(8000))  
UNION
SELECT CAST('Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.' AS VARCHAR(8000)) 
 
0 Kudos

Good point Dan...

R&D tends to look at the specific instance and not look at the dynamic's of the report...

Would it be possible to get a report that shows all with a dummy data source so it can be refreshed? The more the better.... An Access MDB would be good if possible or MS SQL Server MDF/LDF I can then attach it to my SQL Server and they could refresh it...

If you can I'll send you an e-mail to get the files...

Thanks again

Don

0 Kudos

Hi Don,

if only it were that easy ...

The text is not fixed and always the same, it comes dynamic from a data source. The User has no option to adjust the textbox each time something is truncated.

This is just an example, we have various issues with other fields.

So because the text can be anything, we can not adjust the the size properly for every case.

This would be a solution for this "example" but not in general.

Thanks and best regards

0 Kudos

Hi Dan,

Sorry for the delay, R&D was discussing possible solutions...

They came up with this:

I have just increase the width of the text object from 17.726 to 17.826, there will be no such issue.

Will that work for you?

I tested it using your example and there is not truncation now...

Thanks again

Don

0 Kudos

Hi,

Crystal Reports for creating the report is version (XI):

11.5.12.1838

We upgraded almost every SP so I can't say since which SP we encountered the problem.

0 Kudos

Hi Dan,

R&D is asking what version was the report design with and what version of CR for VS did you upgrade from?

Thanks

Don

0 Kudos

Hi,

Thanks a lot, I really appreciate that. I hope there will be a solution in a future release.

Best regards

0 Kudos

Hi Dan,

That would be an issue...

The Developer is off on holidays this week, but I have sent an e-mail we had discussing this with multiple people and mentioned your issue.

We should/may have a reply next week and see what they have to say...

Thanks again

Don

0 Kudos

Because this will be an official document we have some layout, ci/cd restrictions from another authority. Font style, size and left-justified is given (with justified print text is not truncated).

0 Kudos

Why do you need the font to be 10?

0 Kudos

Off course the TruncationAdjustment can be modified, but the problem still persists that when you set UsePrecisePositioningForText the font size is smaller in pdf output: 9.95 instead 10.

WIthout UsePrecisePositioningForText, TruncationAdjustment has no effect.

ido.millet Just create an empty report and follow the instructions for creating the textbox. (with regkey forcelargerfonts = 1)

Is there any other option ? Or is there a chance that this will be fixed in a future SP Release ?

0 Kudos

Hi Dan,

Try adjusting the TruncationAdjustment to a lower value.

@ Ido, create a report a based on Dan's example here:

You can reproduce it:

Put the following text in a text box (width: 17.725, height:1.136) Font: Arial, Size:10

Die vorläufige Datenabschrift weist Ihre bisherigen, provisorischen Noten sowie die ECTS der absolvierten Module aus.

Then export to pdf, it will be truncated.

You'll see "Module" has the e chopped off.

Only other option is to use a fixed font like Times New Roman and adjust the text box accordingly.

Don

ido_millet
Active Contributor
0 Kudos

Hi Dan,

Please upload a sample rpt file.
I'd like to test a solution while making sure the test case matches yours.

0 Kudos

Hi Don,

Thanks, I tested these registry settings. It works fine, no truncation anymore with this example.

But unfortunately this is no option / solution, because after rendering the pdf the font size gets smaller. Instead of Arial 10, the text in pdf comes up with font size 9.95.

It is essential that the font size corresponds to the definition.

0 Kudos

Hi Dan,

Thanks for the sample.

If you use 3 registry keys it works fine.

See Master KBA for more info:

https://apps.support.sap.com/sap/support/knowledge/en/2165260

ForceLargerFonts = 1

UsePrecisePositioningForText = 1

TruncationAdjustment = 6 Default is 2

See if that works for you

Don

0 Kudos

I tried 3 versions of usp10.dll, all with same result:

  • 1.0422.3790.1830
  • 1.0626.7601.23259
  • 10.0.17763.864

I tried also different printers

  • adobe pdf
  • Brother
  • HP
  • local and network printer

I tried with "no printer". But then the truncation even gets worse.

All tested with "ForceLargerFonts" set to 1.

I tried to switch screen resolution to 800x600.

You can reproduce it:

Put the following text in a text box (width: 17.725, height:1.136) Font: Arial, Size:10

Die vorläufige Datenabschrift weist Ihre bisherigen, provisorischen Noten sowie die ECTS der absolvierten Module aus.

Then export to pdf, it will be truncated.

0 Kudos

Thank you Don,

I tried both KBA's out and also installed SP28, in the meanwhile even SP29.

No luck with these so far and still facing the same issue.

0 Kudos

SP 28 is available, see if that fixes it, we don't patch CR for VS, only the latest current version is supported.

See if this KBA helps - https://apps.support.sap.com/sap/support/knowledge/en/1216269

And this one - https://apps.support.sap.com/sap/support/knowledge/en/2829461

Don