Print Page | Close Window

Missing printersettings (preferences) CR2008

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Writing Code
Forum Discription: .NET programming API, report integration
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=4453
Printed Date: 05 May 2024 at 10:42am


Topic: Missing printersettings (preferences) CR2008
Posted By: IvanG
Subject: Missing printersettings (preferences) CR2008
Date Posted: 06 Oct 2008 at 6:20am
Hi,

Hope som of you guys can help me out here.

I'm having problems printing with correct printer settings. Some of the settings are not used by Crystal Reports basic version in VS2008.

I use this code:

PrintDialog printer = new PrintDialog();
            printer.ShowDialog();
            printerSettings = printer.PrinterSettings;
            report.PrintOptions.CopyFrom(printerSettings, pageSettings);
            report.PrintToPrinter(printerSettings.Copies, printerSettings.Collate, printerSettings.FromPage, printerSettings.ToPage);

When I open the printer dialog again with the earlier choosen settings, the settings are correct:
printer.PrinterSettings = PrtSettings;
printer.ShowDialog();

But when I print a report, settings like scaling and other stuff in the preferences dialog are not used by Crystal. The settings in the PrintDialog is correct though (number of copies,etc.)

When I use the CrystalReportViewer the settings choosen are used as supposed to when printing, but in my scenario I have to print automatically.

What to do?
How come it's not working?

Pleeeze help...

/Ivan



Print Page | Close Window