cancel
Showing results for 
Search instead for 
Did you mean: 

Font size issue with CrystalReportViewer

Former Member
0 Kudos

Hello,

We encounter an issue when printing a document with Visual Studio 2010 Crystal Report Viewer for WPF application (the one defined in SAPBusinessObjects.WPF.Viewer.dll).

Font size is not correct in printed document. Font size is about 0.5 smaller than expected.

I have tried to upgrade Crystal Report for .Net Framework 4.0 to Support Pack 8 (http://scn.sap.com/docs/DOC-7824), but I it does not solve my issue...

According to this post (http://scn.sap.com/thread/1161804), I have also tried to add following keys in registry (even if font size issue appears when printing document, so normaly not related to pdf export…):

  • HKEY_LOCAL_MACHINE\SOFTWARE\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Export\Pdf : "ForceLargerFonts"=dword:00000001
  • HKEY_USERS\S-1-5-21-2766292881-3032009010-1499191949-3451\Software\SAP BusinessObjects\Crystal Reports for .NET Framework 4.0\Crystal Reports\Export\Pdf : "ForceLargerFonts"=dword:00000001

Unfortunately, it did not solve font size issue…

Thanks for your help!

Yann

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Yann,

Those keys are for exporting only. Try modifying the report in CR Designer, go to Print the report and on the first screen you'll see an option to Center the Page, uncheck it and apply and then cancel and save the report:

See if that works for you.

If it doesn't then we'll have to track it. As a work around export the report to PDF format and then print the PDF file.

Don

Former Member
0 Kudos

Hi Don,

Thanks for your quick answer.

We tried to uncheck “Center the Page” but it does not solve our problem…

I have reproduced the issue in a sample WPF .Net project.

I attach this sample to this post (.rar extension is renamed .txt).

We have an rpt file that shows 3 lines with different font size.

We print this document by using Crystal Report Viewer and we compare to a print from a Word document with same font.

Lines widths are not equals between Word and Crystal Report Viewer, even if it is same font and same font size.

We previously used CRViewer.dll in Visual Basic 6 environment.

With CRViewer.dll viewer we have exactly same widths that Word reference.

Is there a special configuration to set for WPF Crystal Report Viewer ?

Thanks!

Yann

0 Kudos

Hi Yann,

You are comparing Apples to Oranges.. RDC and Word to .NET.

Both the RDC and Word use Native Win32 API and DEVMODE to get/set printer info, funny that Microsoft doesn't even use their Own Framework for their Applications....

WPF is new to CR, first version we actaully have one so it's limited in it's abilities and lot's of bugs fixed already.

Ludek did a bunch of testing yesterday and he's going to test your app also.

For now I thnk the best thig for you is to go back to the CR Windows.Form viewer. It's well established and there are work arounds to not use the Framework to print. But we'll test and see if anything we can do. What we recommend for the Windows Form viewer is to use PrintOutputController to handle the printing. You can replace our viewer button with your own and handle all of the printing through code. Lots of sample app's on how to if you search our Kbase system.

We'll update you soon testing your app. I doubt it's any different from ours, just using the print button in the viewer....

Don

former_member183750
Active Contributor
0 Kudos

I spent a fair amount of time testing this with WPF app, Win app, CR designer and Word doc, before realizing that the paper size was set to A1 paper size. Being in NA, just for kicks, I decided to see if there is any difference when I set MS Word Document paper size to 81/2 X 11. Sure enough, the difference is huge. So, now I have no idea who is printing correctly. MS Word when page is set to A1, MS Word when paper size is set to 81/2 X 11, CR designer, WPF app? E.g.; would the correct print output please stand up?

Oh and BTW. In all of my testing, the print outs from CR were actually bigger, rather than smaller...

- Ludek

Message was edited by: Ludek Uher

Answers (0)