cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Print component does not work

Former Member
0 Kudos

I'm using the Crystal Report Viewer in Visual Studio / .Net

I have looked at a couple of threads that discuss this problem, but the problem is either not resolved or I don't understand the resolution.

I have downloaded the cab file and put it in a directory. I have created a virtual directory in IIS and pointed it to the directory that contains the cab file.

If I stick the address of the virtual directory in a browser ... http://myServer/CrystalReportsCAB/PrintControl.cab ... it asks me if I want to Open or DownLoad the file.

If I use the website and try to print a report (where printMode is ActiveX ... CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.ActiveX) a Modal web dialog appears but nothing else happens.

If you close the modal web dialog and click 'View Source' to see the source of the underlying page (which has done a PostBack) it contains ...

var prm = new Object();

prm.codebase = "http://myServerAppraisals/PrintControl.cab"; ...

which, as I said above, is definitely the right address for the cab file (if you stick it in a browser it asks you if you want to Open or Save the file - if you select 'Open' it displays a window with half a dozen files in there including printcontrol.dll)

So, the question is ... why isn't the ActiveX component downloading? I have tried every permutation you can think of in Internet Explorer - prompt for Active X controls, Enable them etc - but nothing makes any difference.

I have also tried putting the cab file in the root of the site and altered web config as follows:

add key="url" value="http://myServer/Appraisals/PrintControl.cab"

but this makes no difference. Again, though, if you put that last url into a browser, it finds the cab file and asks if you want to open or save it.

So, the page that wants to print the report definitely gets a correct reference to the cab file - but does not download it.

Finally, one other bit of info ... the deployment of the application is on an intranet. I develop on a pc and publish the site to a development server for testing and then to a live server. The sites are published (as opposed to copied) so they are compiled and a dll produced.

So, after publishing, I test by going to the User Acceptance Testing or Live sites by typing their address in a browser i.e. I am accessing the compiled code - when I try to print it works - the modal web dialog window appears for a few seconds and then the Print dialog window appears with a list of available printers.

But, everyone else in the organisation - typing exactly the same address into their browser, accessing the site(s) in exactly the same way as me, finds the printing does not work. The modal window appears and nothing happens. A number of these people are administrators on their machines and they have all tried every permutation they can think of inside Internet Explorer to allow the ActiveX control to download.

Any ideas much appreciated. I'm at the point of buying a third party bit of software just so we can print some labels.

Edited by: Sergeant Bilko on Jul 16, 2009 7:16 PM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry, re-posting because post above has no carriage returns in it. Seems you have to stick a html return in?

I'm using the Crystal Report Viewer in Visual Studio / .Net I have looked at a couple of threads that discuss this problem, but the problem is either not resolved or I don't understand the resolution.<br /><br />I have downloaded the cab file and put it in a directory. I have created a virtual directory in IIS and pointed it to the directory that contains the cab file. If I stick the address of the virtual directory in a browser ... <br /><br />http://myServer/CrystalReportsCAB/PrintControl.cab<br /><br /> ... it asks me if I want to Open or DownLoad the file. <br /><br />If I use the website and try to print a report (where printMode is ActiveX ... CrystalReportViewer1.PrintMode = CrystalDecisions.Web.PrintMode.ActiveX) a Modal web dialog appears but nothing else happens. If you close the modal web dialog and click 'View Source' to see the source of the underlying page (which has done a PostBack) it contains ... <br /><br />var prm = new Object(); prm.codebase = "http://myServerAppraisals/PrintControl.cab";<br /><br /> ... which, as I said above, is definitely the right address for the cab file (if you stick it in a browser it asks you if you want to Open or Save the file - if you select 'Open' it displays a window with half a dozen files in there including printcontrol.dll) <br /><br />So, the question is ... why isn't the ActiveX component downloading? I have tried every permutation you can think of in Internet Explorer - prompt for Active X controls, Enable them etc - but nothing makes any difference. I have also tried putting the cab file in the root of the site and altered web config as follows: <br /><br />add key="url" value="http://myServer/Appraisals/PrintControl.cab"<br /><br /> but this makes no difference. <br /><br />Again, though, if you put that last url into a browser, it finds the cab file and asks if you want to open or save it. <br /><br />So, the page that wants to print the report definitely gets a correct reference to the cab file - but does not download it. Finally, one other bit of info ... the deployment of the application is on an intranet. I develop on a pc and publish the site to a user acceptance server for testing and then to a live server. The sites are published (as opposed to copied) so they are compiled and a dll produced. So, after publishing, I test by going to the User Acceptance Testing or Live sites by typing their address in a browser i.e. I am accessing the compiled code. When I try to print it works - the modal web dialog window appears for a few seconds and then the Print dialog window appears with a list of available printers. But, everyone else in the organisation - typing exactly the same address into their browser, accessing the site(s) in exactly the same way as me, finds the printing does not work. The modal window appears and nothing happens. A number of these people are administrators on their machines and they have all tried every permutation they can think of inside Internet Explorer to allow the ActiveX control to download. <br /><br />Any ideas much appreciated. <br /><br />I'm at the point of buying a third party bit of software just so we can print some labels. Edited by: Sergeant Bilko on Jul 16, 2009 7:16 PM

Edited by: Sergeant Bilko on Jul 16, 2009 7:29 PM

Edited by: Sergeant Bilko on Jul 16, 2009 7:34 PM

former_member183750
Active Contributor
0 Kudos

You do not mention what version of CR you are using, but see if [this|https://www.sdn.sap.com/irj/scn/sdnweblogs/postweblog] blog provides any clues / help.

Ludek

Former Member
0 Kudos

Thanks for your reply.<br /><br />

The developer who created the reports tells me he is using version 11.5.3.417<br /><br />

I'm using Visual Studio 2005 version 8.0.50727.762<br /><br />

The references in my web config file to various assemblies are:<br /><br />

<add assembly="CrystalDecisions.CrystalReports.Engine, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
				<add assembly="CrystalDecisions.Enterprise.InfoStore, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />
				<add assembly="CrystalDecisions.Enterprise.Viewing.ReportSource, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304" />

former_member183750
Active Contributor
0 Kudos

That is fine. The basic troubleshooting suggestions in that blog should still apply.

Ludek

Answers (0)