cancel
Showing results for 
Search instead for 
Did you mean: 

Letter problem when I extract a report

0 Kudos

Dear all,

I want to explain an issue that we notice when we extract a Report created by Crystal Report 2011 by a project developed with Visual Studio 2013 and Cristal Report for Visual studio.
Since 2 weeks we have transferred all our project and IIS sites on a new Server with Crystal Report for Visual studio v19 and SQL Server 2016.
We notice that, in all cases, when we extract a Report from the Project Interface we have in ALL the letter "t" occurrence replaced by a "ti". This not happens if we extract the Report directly from the Preview in Crystal Report 2011. Also if we try to modify the .pdf with acrobat reader and we delete the ti character there is no way to delete only the i, it delete t and i together.
This does not happens with the old Crystal Report for Visual Studio, and the Language of Database is the same that before: Italian, with Collation Latin1_General_CI_AS.

Do you know if there is any option to avoid this issue in Crystal Report, or if it depends on SQL Server problems?

Cordially,

Trezzi Alessandro

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

After doing some further research, this appears to be a known issue with the Calibri font. I don't know whether the registry setting in my comment above will help.

-Dell

0 Kudos

Hi Stinnett,

I've tried with your Reg key, without success.
Online I've found this guide:

https://apps.support.sap.com/sap/support/knowledge/public/en/1182391

But even with this attempt I've not reach any success.

I've tried to change character with Arial, and it works, but we have a lot of reports projected on Calibri and it is a lot of work to make.
Do you know why we have this problem only on this new server, with Windows Server 2016, and not with the previous one? Crystal Report version is the same, we change OS, VS and CRforVS versions.


Again, do you know if there is a way to change quickly all the character in a report, or maybe to set character in C# code before an extraction (in report and subreport)?

Thanks a lot,

Alessandro

DellSC
Active Contributor
0 Kudos

Yes, there is a way to do something like this in C#. First, you'll load a report into a ReportDocument object. Then you'll do something like the following:

Font regularFont = new Font(FontFamily.GenericSansSerif, 10, FontStyle.Regular);
Font headerFont = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Bold);
foreach (Section section in procRpt.ReportDefinition.Sections)
{
  foreach(ReportObject rptObj in section.ReportObjects)  
  {
    switch (rptObj.Kind)
    {
      case ReportObjectKind.FieldObject:
        FieldObject fldObj = (FieldObject) rptObj;
        fldObj.ApplyFont(regularFont);
        break;
      case ReportObjectKind.FieldHeadingObject:
        FieldHeadingObject fhObj = (FieldHeadingObject) rptObj;
        fhObj.ApplyFont(headerFont);
        break;
      default:
        break;
    }
  }
}

I didn't find a way to modify stuff in a CrossTab, so you may have to do any of those manually.

-Dell

Answers (2)

Answers (2)

DellSC
Active Contributor
0 Kudos

1. Did you recompile your application with SP19? Or did you just deploy the existing application with the new version of the runtime?

2. Which version of the SQL Server driver are you using? For SQL Server 2016 you need to be on at least SQL Server Native Client 11 or SQL Server ODBC driver 13.

-Dell

0 Kudos

Hi Stinnet,

1. I've tried to recompile too, without any success.
2. If you mean ODBC, I'm using SQL Server Driver; I've also tried with SQL Server ODBC driver 13 but without any success.
This is the connectionString refer in web.config, linked ad the BS ODBC DNS:
<add connectionString="Dsn=BS;uid=sa;pwd=BSPro2012!" name="BS Produzione SQL Server" providerName="System.Data.Odbc" />

DellSC
Active Contributor
0 Kudos

Try the SQL Server Native Client 11. The "SQL Server Driver" that comes with Windows is an old version that Crystal can only use to connect to (I believe) SQL Server 2005 and earlier.

Also, is the font used in the report installed on the server where the reports are running? You may need to tweak the font to get it to work with Italian.

-Dell

0 Kudos

Hi Stinnet,

I've tried also with SQL Server Native Client 11, but nothing has changed.
I've checked and Calibri font is installed in server.

Again, problem is also with normal text, not only with data extract from SQL Database, so I do not think that is an ODBC issue.

For another attempt I've tried to change the exportformattype.portabledocformat with NoFormat, to open the default export page of CR.
If I try to extract any other format (such as Word) character is correct; problem is with the PDF extract.

We cannot use Word format for a paging problem, and we have in our company many reports, I think that is a runtime problem, with the ASCII conversion on PDF extract.

DellSC
Active Contributor
0 Kudos

There is a registry setting that may work.

In either of the following:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0 - (on 64 bit OS)
  • HKEY_CURRENT_USER\Software\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0

go to or create ...\Crystal Reports\Export\PDF.

Then create the key UseCustomEncoding with a value type of DWord and a value of 0

-Dell

0 Kudos

Hi Trezzi,

Is it possible to upload the report with saved data, make sure it is dummy data, so I can test it?

We can no long attach rpt files to forums so you need to provide a link for me to download it from.

Don

0 Kudos

Hi Don, thank's for you answer.
Sadly I've only reserved data; how can I send to you Report with dummy data?
However, could be the convertion in pdf mode?