cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Viewer Scale Report Page to Fit Printer Page Disabled

Former Member
0 Kudos

Need help with determining how to disable Scale Report Page to Fit Printer Page for VB.NET because all my crystal reports print outs are smaller than how they use to print after upgrading to Crystal Reports XI SP4.  I have coded the program to not scale during run-time but nothing seems to make a difference in terms of disabling the Scale Report Page to Fit Printer Page.

Dim printPrompt As New Windows.Forms.PrintDialog

printPrompt.PrinterSettings = New System.Drawing.Printing.PrinterSettings

printPrompt.AllowSomePages = True

Dim oLayout As New CrystalDecisions.Shared.PrintLayoutSettings

oLayout.Centered = False

oLayout.Scaling = PrintLayoutSettings.PrintScaling.DoNotScale

Dim margins As PageMargins

margins = rpt.PrintOptions.PageMargins

margins.bottomMargin = 0

margins.leftMargin = 0

margins.rightMargin = 0

margins.topMargin = 0

rpt.PrintOptions.ApplyPageMargins(margins)

rpt.PrintToPrinter(printPrompt.PrinterSettings, printPrompt.PrinterSettings.DefaultPageSettings, False, oLayout)

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

As far as I know, this works fine with SAP Crystal Reports, developer version for Microsoft Visual Studio (2010 / 2012) - reference KBA 1836340. I do nto remember if there were any issues with this in CR XI, however I would highly recommend upgrading to CR XI R2, Service Pack 6. See this blog on how to.

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi Ludek,

I want some help to fix the issues on Report Viewer. Please let me know how can i contact you.

Thanks,

Amit

former_member183750
Active Contributor
0 Kudos

Not sure I understand? This post was created by Ray Chung.  If you have a specific query, please create a new discussion.

- Ludek

Former Member
0 Kudos

My apologies, I'm actually using 13.0.2000.0 SAP Crystal Reports for .NET Framework 4.0 SP6 Runtime files and SAP Crystal Reports, developer version for Microsoft Visual Studio 2010 version 13.0.6.1027.  I uninstalled the newest version and installed CR XI R2 Service Pack 6 but was unsuccessful due to the fact that my reports have already been upgraded to latest version.

I was not successful with making the code work with VB.NET

     Select GetPreviewPagesStartwith.Text

            Case "Full Size"

                PrintLayout.Scaling = PrintLayoutSettings.PrintScaling.DoNotScale

            Case "Fit Width"

                PrintLayout.Scaling = PrintLayoutSettings.PrintScaling.ShrinkOnly

            Case "Fit Page"

                PrintLayout.Scaling = PrintLayoutSettings.PrintScaling.Scale

        End Select

rpt.PrintToPrinter(printPrompt.PrinterSettings, printPrompt.PrinterSettings.DefaultPageSettings, False, PrintLayout)

former_member183750
Active Contributor
0 Kudos

Sorry Ray, just want to be very sure about the details; all the CR assemblies referenced in your project are of version 13.x - correct?

And one more question;

Is the "No Printer" option checked or unchecked? If unchecked, what's the printer driver used?

- Ludek

Former Member
0 Kudos

Yes, I have removed all the old CR assemblies and have only used the latest 13.x versions.  I usually uncheck "No Printer" and select "Microsoft Office Document Image Writer", I have also tried make sure "No Printer" is checked and set the printer to "Microsoft Office Document Image Writer", or Xerox Printer or Dell Printer.  The "Scale Report Page to Fit Printer Page" is still greyed out and my code still does not disable option "Scale Report Page to Fit Printer Page".

To rule out my code, I have recreated everything from scratch using a very basic test vb project with the latest 13.x CR assemblies, and just added the CrystalReportViewer control to my form.  I then created new blank crystal report and every time I run a test print using the CrystalReportViewer, the "Scale Report Page to Fit Printer Page" is still greyed out.

Former Member
0 Kudos

Is there a way to disable this feature the "Scale Report Page to Fit Printer Page" CrystalReportViewer?  Or better yet can you explain to me what causes the "Scale Report Page to Fit Printer Page" and "Center to Page" to automatically be checked and greyed out?  I can't seem to find any way to disable the setting because all of my 1000 of Crystal Reports don't line up anymore.  I have tried recreating them but by default the "Scale Report Page to Fit Printer Page" and "Center to Page" are checked and greyed out automatically.

former_member183750
Active Contributor
0 Kudos

Not sure why "Scale Report Page to Fit Printer Page" and "Center to Page" would be checked and grayed out. I am not able to repro it here.

But, make sure you have at least one printer driver installed - a real printer driver. E.g.; PDF printer driver or Microsoft XPS document printer don't count.

- Ludek

Former Member
0 Kudos

Okay I tried with a real printer and confirmed that the print outs are still shrinking and the options "Scale Report Page to Fit Printer Page" and "Center to Page" are still greyed out.  What I did notice is that this problem only occurs during run time.  When I print the report in the dev environment straight from Crystal reports, the print out comes out exactly the same size.  But as soon as I execute the test project, the print outs automatically shrink during runtime. I am using the Crystal Report Viewer default settings and clicking on the print button from the toolbar.  The problem occurs during run time and not during design time.

former_member183750
Active Contributor
0 Kudos

Sorry Ray.  I have no idea why those options would be grayed out. Never seen that before...

See if enabling the option "Dissociate Formatting Page Size and Printer Paper Size" will help (Page Setup).

If the Dissociate option does not help, I'd suggest creating a phone support case here:

http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100

- Ludek

Former Member
0 Kudos

Hi Ray,

Have you resolved this issue? Same problem I am also facing. "Scale the report to fit to printer page" and "Center the page" is always greyed out. I couldn't make any changes.

Please help me out.

0 Kudos

Hi Guys,

Scale to fit is for when you, for example, use a custom paper size in a report, say 4 x4 and then try to print to a printer that does not support that size and only has 8 1/2 x 11. The report page is smaller than what has been selected from the printer so now you can scale the output to not scale, the option is no longer grayed out.

The issue is the Framework is scaling the page, we don't have any control over that part. all part of System.Printer properties.

Some current testing suggests setting the report margins to zero seems to be part of the fix. At least it reduces the amount the objects are moved.

It works in CR Designer because CRD does not use the framework to print the report and uses DEVMODE to get the printer properties.

By default I think the framework scales .5% or something like that. You'll notice the very center of the page is exact and the further you move in any direction the more the objects appear to be adjusted.

Trying to find ways to make this work...

Don


Answers (0)