Skip to Content
author's profile photo Former Member
Former Member

Invalid Printer Specified Error

I have an application that allows the user to select the target printer from the list of available printers on the system.

The following code generates the list of printers from which they select:

Dim PrinterList As New List(Of String)

Dim PrintServer = New LocalPrintServer

Dim PrintQueues = PrintServer.GetPrintQueues(New EnumeratedPrintQueueTypes() {EnumeratedPrintQueueTypes.Connections, EnumeratedPrintQueueTypes.Local})

For Each p In PrintQueues



The selected value is saved. When I go to print, I use the following code to select the printer:

ClientInstructions.PrintOptions.PrinterName = My.Application.PrinterSettings.ActiveLetterheadPrinter

Edited by: Don Williams on Aug 10, 2010 7:08 AM

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Oct 08, 2010 at 10:04 PM

    My first instinct is that there is a configuration problem with the redirected printer. I have little experience with redirected printers personally, but have you looked at the Event viewer on the Terminal Server to see if there are any entries related to printing?

    For those wondering what redirected printing is, I found this site useful

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 10, 2010 at 02:08 PM

    This works 90% of the time. I occasionally get the following error:

    Error generated by: Print Client Instructions - Print Record Copy

    Error Message: Invalid printer specified.

    temp_63b3d1f8-dedf-4eee-a119-0d301e2a98fa {34670353-397C-4316-B1EC-206D545CB318}.rpt


    Source: Analysis Server

    Target (Method): Void ModifyPrinterName(System.String)

    Stack Trace: at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName(String newVal)

    at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName(String value)

    at Workflow_WPF.ReportPrinting.PrintClientInstructions(RecordEntry ClientInstruction, Boolean ClientCopy, Boolean RecordCopy, Boolean Envelope, objVisitData WorkingData) in D:\TomGarg\Documents\Visual Studio 2008\Projects\WMS WPF\WorkflowClientApp\Modules\ReportPrinting.vb:line 1037

    Printer: hp OfficeJet 8500 Premier (redirected 2)

    When I use other redirectred printers, it works fine.

    Any idea what I am doing wrong? Any thoughs are greatly appreciated.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.