cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to start print job - Crystal For VS 2010.

Former Member
0 Kudos

We're having a problem printing reports. We're using the runtime version of CR for Visual Studio 2010 (SP 5). The reports are run in code.

Windows Server 2008, 64-bit, .net 4.0, IIS 7.0

The reports run correctly but when clicking the printer icon, there is a delay and then the Printer Setup window appears (in the background). On selecting print a dialogue "unable to start print job" appears.

I suspected it may be due to the printer being offline but it doesn't seem to matter if printer is ready or offline. In fact, it sometimes appears that this action takes it offline.

From the wonders of google, we've tried numerous things to resolve:

Ensured we're using SP5 of the runtime. Disabled DEP. Set internet security to low. Tried it in Firefox. Made the printer local instead of network.

The user has a mixture of Windows 7 and XP machines. Some work, some don't.

I'm struggling to know where to go with it next. I don't even know if the issue is the printer, IE, the Crystal viewer?

Help!

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Hello Ricky

Are you using PDF Print Mode or ActiveX Print Mode? I suspect it is PDF(?). If that is the case, please go to this link:

http://forums.adobe.com/thread/303006

and see if any of the suggestions there help.

Please do let me know if that helped as I'd like to document this in a KBA and update another forum thread on this same topic.

- Ludek

Senior Support EngineerAGS Primary Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi Ludek,

Thanks for the prompt response.

We use Active-X print mode.

Rick

former_member183750
Active Contributor
0 Kudos

Ricky, I wonder if any of the suggestions in this blog may help(?). I know you've done a lot of work on this, but maybe the blog has something that was missed.

I also wonder if (as a test) you could try PDF Print Mode, see how that works.

- Ludek

0 Kudos

PDF print mode is also limited. It works in IE but since Firefox and Chrome have added their own PDF print driver code within the Browser CR no longer pop's up the PDF print Dialog. you can work around this by changing the PDF option in Firefox:

Chrome has the same ability but doesn't seem to work. IE still works though...

I believe you problem is due to permission and access to ActiveX components. Try registering crviewer.dll using resvr32.exe.

Don

saurabh_pathak
Active Contributor
0 Kudos

I have few issues similar to one you are facing. Here is what i did:

Why should I store Report's object in HttpSession?

It might not be your case, but worth trying.

~ Saurabh

Former Member
0 Kudos

Hi Ludek,

Thanks for the response. I went through the blog yesterday. I created an aspx page to detect the installed printers from the client. The only printer found is the Document Writer.

I followed the link COM objects fail to print when called from ASP and we tried adding to the .default registry setting and rebooting the server but it made no difference.

I also confirmed that it's not Vista, the latest printer drivers are installed, there is no firewall, the domain controller allows sharing and we tried connecting it as a local printer on Friday.

I'm told the issue is with XP machines, it works OK on Windows 7.

I've tried running in PDF mode but it's still ActiveX!

It's difficult because we can't reproduce the problems on our ow or other site, just this one.

Do you have any other ideas?

Regards,


Rick

Former Member
0 Kudos

Thanks for that Don.

I asked that they register crviewer.dll but they don't have one. Only printcontrol.dll.

Rick

Former Member
0 Kudos

Thanks for the reply Saurabh. We've always used session to hold the report document. We found originally taht we had an issue switching pages without doing so.

former_member183750
Active Contributor
0 Kudos

Couple of ideas Ricky

1) Let's take a look at what printer drivers are being seen by the process after you you did this:

COM objects fail to print when called from ASP

The code described in the following KBA, when injected into your app (just for testing purposes), should list the printers available to the process:

1418378 - How to determine what printers are available to a process in Visual Studio .NET

If the above still only shows Document Writer, you want to ask on one of the MS forums.

2) Using an HTTP sniffing utility like Charles or Fiddler may help, though I must admit I'm not too confident of that...

Finally, this is rather confusing:

I've tried running in PDF mode but it's still ActiveX!

I have never run into an issue where ActiveX print would somehow over-ride PDF print mode. Print mode can be set off of the viewer control in the .NET IDE, or in code:

CrystalReportsViewer1.PrintMode

Please double check that on your development computer, then see how that works on the client.

Oh - and for now, let's just stick with testing on IE - no FireFox, etc.

- Ludek

Message was edited by: Ludek Uher

Former Member
0 Kudos

I'm struggling with the installed printers list, Ludek, because we're only seeing the Document Writer  on all machines but it works locally on the server (2008 R2) and on Windows 7 but not on the XP machines.

I tried logging on to the XP machine as the administrator account rather than the domain account with admin privilege. The message I got changed to "Could not connect printer to port". It will print from other applications OK though.

Re: PDF

Here is the report viewer after I've changed it to PDF mode. I've captured the PrintMode in the text box in the header.

<CR1:CRYSTALREPORTVIEWER id="crv" Height="50px" Width="350px" runat="server" AutoDataBind="true"

    HasRefreshButton="True" PrintMode="Pdf" HasCrystalLogo="False" BorderStyle="Solid" BackColor="White" ToolPanelView="None"></CR1:CRYSTALREPORTVIEWER>

The only thing we're doing that may not be standard practice is dropping the report viewer onto an ascx page. We then insert this into a place holder on the aspx page. We do this because we use the same reporting app for Crystal 9 and 10 also so depending on a switch, it can run the old stuff.

Would you suggest I try it with the Crystal viewer dropped straight onto the aspx page?

Regards,


Rick

former_member183750
Active Contributor
0 Kudos

Hello Rick

Unfortunately, I'm out of ideas - almost as it turns out... Where I am coming from is; if the process can not see the printers, Crystal Reports engine will also not see the printers. It may be that other applications can print, but are they web apps? I suspect printing a report from a simple win app will work.

I believe the issue is permissions and it will be similar to KBA 1409398 - How to change the Currency Symbol in a Crystal Reports .NET web application

The above is for currency symbols, but applying the above to printers may be the ticket here. Other than that, using Process Monitormay tell you what key is attempted to be used.

And after that, it may be time to get help from MS re. why the process is not seeing the printers when the code in KBA 1418378 is used.

- Ludek

0 Kudos

Hey Guys I just had a thought.... Right click on IE's short cut and select " Run As..." and choose the Admin.

Don

Answers (0)