Strange Crystal Report formatting problem

2019-09-17 21:46发布

问题:

I am using Crystal Reports v10.0.x on Windows Server 2003 SP2. I have an .rpt file that gets exported into a PDF format using the Crystal Reports Engine thingy.

new CrystalDecisions.CrystalReports.Engine.ReportDocument().ExportToDisk(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, fullExportFileName);

I have this report on two boxes. Both the boxes are Windows Server 2003 with SP 2 running the same version of Crystal Reports. Let's call these boxes box 1 and box 2.

Till now, all reports ran fine on both the boxes. Suddenly, since yesterday, one box 1, all reports have a formatting issue. All reports that have text fields/text boxes with running paragraph text truncate the right most few characters on every line, or at least that is how they display it, if you know what I mean.

For e.g. the text

Today is a great day for everything else except this problem I am facing with
Crystal Reports. And then, there's a whole lot of work to do after this. I am 
sick and tired of this job.

is displayed as:

Today is a great day for everything else except this problem I am facing w
Crystal Reports. And then, there's a whole lot of work to do after this. I a 
sick and tired of this job.

The code on both the boxes is the same, and the .rpt files, too, are the same. Please help.

回答1:

Check for changes to printer settings on Box 1, as these are generally used by Crystal when rendering a report. If the default printer is changed, the rendering will change.



回答2:

Any formatting issues with Crystal Reports are ALWAYS related to fonts, printers, and printer drivers. If the reports were working fine, and now they are formatted differently, something changed with the fonts, printers, and printer drivers.

Are both machines printing to the same printer? Are you using a fairly standard font like Arial, Courier, Times New Roman, etc?

Open the report template and set the printer to the one you're having problems printing to. This will indicate to the report that it should format for that printer.