Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Missing printersettings (preferences) CR2008 Post Reply Post New Topic
Author Message
IvanG
Newbie
Newbie


Joined: 06 Oct 2008
Location: Denmark
Online Status: Offline
Posts: 1
Quote IvanG Replybullet Topic: Missing printersettings (preferences) CR2008
    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
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.