Crystal Report extra characters when exporting to PDF

Crystal Report Extra Characters

 

Crystal Report extra characters: This is a problem I have had a number of times. It happens on multiple workstations, and it has a habit of returning. After some investigation, it would appear that it returns after a Crystal upgrade.

The symptom:

Exporting a Crystal Report that uses the Calibri font to a Portable Document Format file (PDF) will add an extra ‘ti’ after any letter ‘t’. Oddly, if you copy & paste the word into notepad or other text editor, it is correct.

The cause:

In my previous experience the problem has been caused by a missing USP10.dll file  (Uniscribe Unicode Script Processor) in the following path:

C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86

Either that, or it’s a different version. On my machine, the USP10.DLL file can be found in the following places, and I’ve included the MD5 of each for later reference:

d529d8f23f9c686a293203eb837b61ec

“C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\usp10.dll”

9255da3e4662edf10170e30e8b97c194

“C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win64_x64\usp10.dll”

85cea5cd92c4766ac54823011f6de43b

“C:\Program Files (x86)\Common Files\Microsoft Shared\OFFICE14\USP10.DLL”

1602a45f76281381dcfc88e25d889027

“C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\Packages\vwd\usp10.dll”

9870191d0f26bdaaf6d4550eee3a96ec

“C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\usp10.dll”

I had to use Process Explorer (a fantastic tool) to find out exactly which one was in use – in this instance it was at the following path:

C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\usp10.dll

It is version 1.626.7601.23259, which can be found in the details screen of the file:

Crystal Report Extra Characters : USP10.DLL d529d8f23f9c686a293203eb837b61ec

USP10.DLL d529d8f23f9c686a293203eb837b61ec

 

So I copied over the USP10.DLL from “C:\Program Files (x86)\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\usp10.dll” to “C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\usp10.dll”, and the problem was resolved. For reference, the MD5 of the one that works is 9870191d0f26bdaaf6d4550eee3a96ec, and the details are as follows (file version 1.422.3790.1830):

Crystal Report Extra Characters : USP10.DLL 9870191d0f26bdaaf6d4550eee3a96ec

UPS10.DLL: 9870191d0f26bdaaf6d4550eee3a96ec

I found the following page helpful during my investigations of this issue:

https://archive.sap.com/discussions/thread/1272660

Check out my other Crystal Report annoyances here:

https://roguelj.co.uk/tag/crystal-reports/

Crystal Report PDF Export Font Size Problem

Gonna make a note of this now as I’ve just spent 2 days looking for a quick resolution to the much-mentioned ‘Crystal Report PDF Export Font Size’ issue.

The Problem

Exporting a Crystal Report to a PDF causes a reduction in font size. Simple as that really. The problem does not manifest when printing ‘to’ a PDF via software such as Foxit (can’t recommend Foxit enough by the way, so much better than the Adobe bloatwhale). However this wasn’t an option as I wanted to export programatically, and needed to set the file name.

The ‘Crystal Report PDF Export’ Fix

If you’ve spent any amount of time researching this issue on the Internet then you have no doubt seen several different registry keys to edit, add or modify. After trying various different entries the one that worked for me is as follows:

Crystal Report PDF Export

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Export\Pdf

 

Just add a DWORD value named ForceLargerFonts to the above registry key, with a value of 1. Why we still need to do this in 2015 when it appears the issue has been round for years is beyond me. SAP/Business Objects – sort it out.

My Environment

This is on my 64-bit Windows 8.1 workstation machine running Visual Studio 2013 & Crystal Runtime 13.0.12. I’ve noticed that as of time of writing (16-04-2015) that there’s a new service pack. I’ve not tested this new SP but I’m gonna hazard a guess that it hasn’t been fixed.

And thanks to…

The following sites were helpful in resolving this issue, but I don’t think any of them had the solution that worked for me. That said, my Google Fu may have been weakened by my frustration so may have missed it.

http://www.morovia.com/kb/Font-size-decreases-exporting-PDF-Crystal-Reports-10053.html

 https://www.arcanadev.com/support/kb/K00000394.aspx

 

crdb_adoplus.dll file strangeness

crdb_adoplus

I was running into some problems when trying to use the Crystal Report Viewer in Visual Studio 2010 to view data stored in a local DataSet. After some initial problems with the Database login prompt appearing (you need to set the source with SetDataSource on the report document object, folks), I thought i’d sorted it, until I ran into this:

Could not load file or assembly ‘file:///C:\Program Files (x86)\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Common\SAP BusinessObjects Enterprise XI 4.0\win32_x86\dotnet1\crdb_adoplus.dll’ or one of its dependencies. The system cannot find the file specified.

Changing a setting in the app.config file sorted it out. Here’s what I needed to change:

<startup>
  <supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″/>
</startup>

to:

<startup useLegacyV2RuntimeActivationPolicy=”true”>
  <supportedRuntime version=”v4.0″ sku=”.NETFramework,Version=v4.0″/>
</startup>

Here’s the MSDN Article that explains the useLegacyV2RuntimeActivationPolicy attribute in more detail:

http://msdn.microsoft.com/en-us/library/bbx34a2h(v=vs.100).aspx

Whether this causes me headaches further down the development path remains to be seen……