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