Printing not selecting default printer

delaben (8 posts)
April 6, 2016 11:42 AM
Accepted Answer

Hello,

 

I've set a report to run x2/day (in trial mode , looking to buy).  However, I'm getting a 'no printer installed' error:

 

2016-04-05 06:01:10 Debug Applying connection information2016-04-05 06:01:10 Info Processing Output Group Missing Data Report t-242016-04-05 06:01:11 Verbose Setting parameters2016-04-05 06:01:11 Verbose Setting parameter DateRange2016-04-05 06:01:11 Debug Start value: "2016-04-04"2016-04-05 06:01:11 Debug End value: "4/3/2016 12:00:00 AM"2016-04-05 06:01:12 Info Processing Output Print2016-04-05 06:01:14 Info Printing to printer ML-OBLJ12016-04-05 06:01:17 Verbose Setting paper source to Printer Auto Select2016-04-05 06:01:38 Error Could not print report: No printers are installed. Exception detail: System.Drawing.Printing.InvalidPrinterException: No printers are installed.   at System.Drawing.Printing.PrinterSettings.GetHdevmodeInternal(String printer)   at System.Drawing.Printing.PrinterSettings.GetHdevmode(PageSettings pageSettings)   at CrystalDecisions.CrystalReports.Engine.PrintOptions.CopyTo(PrinterSettings printer, PageSettings page)   at CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)   at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)   at #Lwd.#Kwd.#gk(#Rvd , PrintOutput )2016-04-05 06:01:38 Info Processing complete

 

There are, in fact, many, and the one I want it to print to is set as default.

This topic has an accepted answer. Jump to it.
Bill Staff (599 posts)
April 6, 2016 11:46 AM
Accepted Answer
Does it work if you run it directly from a command prompt? If it works then but fails when you schedule it then it's probably the same problem as your other recent issue: your scheduler isn't loading your user profile, so no printers are available (they're loaded as part of the user profile).
delaben (8 posts)
April 6, 2016 02:01 PM
Accepted Answer

Hmm... from my previous, running the server folder seemed to work \\....\*.rpt.

should I use the command prompt builder?...  or what do you suggest for mapping to the printer to prevent this?  Currently, the default printer is setup via tcp/ip as a local device.

Bill Staff (599 posts)
April 6, 2016 03:48 PM
Accepted Answer

Sorry, I was misremembering the details of the other discussion, but it's a similar issue, related to profile loading.

I assume you're using the Windows Scheduler, and you have the option set to "Run whether user is logged on or not." When you do this, the scheduler does not load the user profile, so no printers are available.

The only workaround I know of for the Windows Scheduler is to change the setting to "Run only when user is logged on," and then of course you need to keep the user logged in. When you do this, the scheduler runs the job in the existing logon session, which has the profile loaded and thus has access to the printers.

This is a limitation of the Windows Scheduler, not with Report Commander. You may want to read around a bit and see if there's a way to make it load the profile and get printers working, but I didn't turn up anything.

If that's not feasible you would need a scheduler that will load the profile correctly even if the user is not already logged on. Our adTempus scheduler does this and others probably do as well.

User5034 (1 post)
March 7, 2017 01:54 AM
Accepted Answer
What I did is removed other printer available and left one that I am currently using then set is as the default one. It was the help advise from my friend that is familiar with it and working on his project at [...]

Replies are disabled for this topic.