Solved

Invalid printer specified.

Posted on 2006-11-24
9
5,702 Views
Last Modified: 2011-02-18
I have a windows application developed in C#. My application need to print in two local printers 'av1' and 'av2'. I use the following code:

...
rpt.SetParameterValue("xx", owner.ZipCode);
rpt.SetParameterValue("xx", dtFrom.Value.ToShortDateString());
rpt.SetParameterValue("xx", mSales.Summary.ToString("C"));

rpt.PrintOptions.PrinterName ="av1";
rpt.PrintToPrinter(1, true, 0, 9999);
...

and same for the other printer

...
rpt.PrintOptions.PrinterName ="av2";
rpt.PrintToPrinter(1, true, 0, 9999);
...

The problem is that somtimes it works and sometimes occurs exception:
{System.Runtime.InteropServices.COMException (0x80000201): Invalid printer specified.
   at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName(String newVal)
   at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName(String value)
   at Administrimi.ListSalesForm.btnPrint_Click(Object sender, EventArgs e) in F:\MyProgs\DotNet\MyApplication\Administrimi\ListSalesForm.cs:line 233}

Any suggestion?
0
Comment
Question by:Albvision
  • 4
  • 4
9 Comments
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 350 total points
ID: 18009241
Are the printers the same kind?

Crystal is highly dependent on the printer driver.

mlmcc
0
 

Author Comment

by:Albvision
ID: 18009259
Printers are NCR Printer 7197 same type.
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 350 total points
ID: 18009868
Are the printers always available?

Do all users have permissions on them?

mlmcc
0
 

Author Comment

by:Albvision
ID: 18010678
Yes, all of users have the same premissions on both printers.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 2

Assisted Solution

by:AtulKamdar
AtulKamdar earned 150 total points
ID: 18011180
put some delay between to print commands.
0
 

Author Comment

by:Albvision
ID: 18043541
I tried but same again. For example it works for five hour after that time occourd the error.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 350 total points
ID: 18046161
Can a printer be moved offline or reserved by a user?

Can a printer get overloaded or a print queue be full?

mlmcc
0
 

Author Comment

by:Albvision
ID: 18049694
The problem who we have is showed above. The Printers are normally installed in the same form and the once is Primary (the default) and the other is as secondary installed. Both printers are OK configured through NCR Tool and are working.

Both printers can be moved offline and online and can be reserved by a user.

Yes, the printer do from time to time an "limited by administrator processing capacity". Maybe you know the problem?!

Regards and many thanks for your help!
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18180228
Glad i could help

mlmcc
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now