Default printer

  • Thread starter Thread starter KevinK
  • Start date Start date
K

KevinK

Hi,

I want to print my crystal report without showing a preview of the report.

So I use the myreport.ReportSource.PrintToPrinter(2, True, 0, 0) command,
but when doing so I get an exception saying: no default printer

Can anyone help me?

Thanks
 
Hi Kevin,

I've had this exact same problem since v1.0 of the framework and
unfortunately it's a shortcoming which hasn't been rectified, even in v2.0.

It usually occurs because, as the error message implies, there is no default
printer for the current user profile. It can also occur however if the
current user doesn't have sufficient access rights on the existing default
printer. Unfortunately you can't even do a print preview in these cases
without it throwing an exception.

The only recourse is to trap the error, grin, and bear it.

Regards,
Alex Clark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top