0
votes

We have a problem when printing reports from within our application.

We want to avoid, that the print function in Crystal Reports 2008 scales reports automatically, so that the full report content fits into the printable area of the specific printer.

The predecessor Crystal reports 11 did not scale anything, that’s what we want to achieve for Crystal Reports 2008.

Sadly the following code throws an exception:

Dim layout As New CrystalDecisions.Shared.PrintLayoutSettings

'Disable scaling, does not work
layout.Scaling = PrintLayoutSettings.PrintScaling.DoNotScale

crystalReport.PrintToPrinter(printerSettings:=printerSettings, 
                             pageSettings:=pageSettings,
                             reformatReportPageSettings:=False, 
                             layoutSettings:=layout)

Interestingly the SAP Crystal Report Viewer 2008 prints reports correctly, without scaling, so we guess the functionality exists.

3
Have you applied the latest hotfixes and/or service packs? - craig
What sort of exception do you get (NotImplemented)? - Kevin Stricker

3 Answers

1
votes

Have you tried this setting?

crystalReport.PrintOptions.DissociatePageSizeAndPrinterPaperSize
1
votes

Have you tried setting this registry key?

HKEY_LOCAL_MACHINE\SOFTWARE\BusinessObjects\Suite12.0\CrystalReports\DesignerOptions

"DealWithMinimalMarginsWhenPrinting"="0"

From SAP forum. Did not work for us, but we are using CR for VS 2010.

According to this it might not be possible. The only workaround, we found so far, is to set your margins to printable area. Might not work for you.

-1
votes

In our case, we're using the custom paper size (8.27x8.75) and in crystal report viewer the scaling and centre settings were greyed out while set to True as described in the question above. By adding our custom paper size in the printer properties (customer paper) the problem has been fixed.