Set default printer for web

G

glbdev

Hi.

I have a web page and need to set the printer name in order to print a
crystal report.

Here's a piece of the code:

oRpt.PrintOptions.PrinterName ="HP LaserJet 4L";
oRpt.PrintToPrinter(1,false,1,1);

This works great if I only intend to use the hard-coded printer
specified, but how can I get it to open a dialog box and manually
select which printer I want to use to replace the "=HP LaserJet 4L".

Thanks!
 
G

glbdev

Because no one seemed interested in answering it in the C# thread and I
realized that I probably should have posted it in ASP.Net to avoid the
confusion that someone would think the question would relate to Windows
Forms instead of Web Forms.
-------------------------------------------------------------------------------------------------------------------------------
Did you not post this in aspnet forum? Why the multi post?

--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Hi.

I have a web page and need to set the printer name in order to print a
crystal report.

Here's a piece of the code:

oRpt.PrintOptions.PrinterName ="HP LaserJet 4L";
oRpt.PrintToPrinter(1,false,1,1);

This works great if I only intend to use the hard-coded printer
specified, but how can I get it to open a dialog box and manually
select which printer I want to use to replace the "=HP LaserJet 4L".

Thanks!
 

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

Top