Results 1 to 4 of 4

Thread: Getting Client's default printer

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    13

    Getting Client's default printer

    I have a web application. I am getting the default printer and passing it to Crytal Reports. The problem is when I put the application on the web server it picks up the web server printer and not the client printer. How do I get the client's printer?

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You might have to use client side scripting.

  3. #3

    Thread Starter
    New Member
    Join Date
    Aug 2003
    Posts
    13
    Do you have an example?

    This is how I am doing it now.
    ex.

    Dim strPrinterName As String
    For i = 0 To oPrinter.PrinterSettings.InstalledPrinters.Count - 1
    strPrinterName =
    oPrinter.PrinterSettings.InstalledPrinters.Item(i)
    If oPrinter.PrinterSettings.IsDefaultPrinter Then Exit For
    Next

    moRpt.PrintOptions.PrinterName = strPrinterName

    This will work fine on your computer but not on the web server.
    How can I get access the client's printer?

  4. #4
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    Since ASP.NET is a server side technology, you will not be able to execute anything on the client side. So you have to use Javascript. Unfortunately I know very little Javascript.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width