From part 1 of this article, you got list of steps in order to deploy Crystal Reports 2008 project created in Visual Studio 2008.
Next step is to choose deployment strategy, prepare installation script and then install it on IIS server.
There is enough written about deployment process from within Visual Studio so let’s give some people credit for their work – for example, please check this article – I am going to use it as a base.
All things considered there is still a variation to that process specific to Crystal Reports.
Note: Make sure you have latest runtime available for you – visit SAP download page – as of 10/19/2009 runtime version available is 12.2 .
Preparing the installation
Deploying standalone .Net application should not be a problem using standard procedure, but with ASP.Net application some problems may arise…
Lets go with Windows Installer approach.
One thing to add to the steps presented in the article above – ensure proper Crystal Report run-time is installed.
If you have followed steps from part 1 of this article, you now have proper version of runtime installed in VS2008.
After you have created your Web-Setup project and followed all the steps, go to project properties and click Prerequisites. What you need to look for here is two lines:
- Crystal Reports Basic for Visual Studio 2008
- Crystal Reports 2008
We are interested in the second option.
Please notice, this would mean (in default scenario) that during installation your setup would attempt to download redistribution package from SAP web-site.
Build, copy, install…
Note: Steps below are based off IIS 6 installation of ASP.Net project.
Deployment packages are copied and installed… Everything is nice and installation seems to be successful.
Trying access a new web-site… and… worse case scenario… error 404 – page not found… O-oh…
From IIS log you may notice something like this at the end of the log record – 404 2 1260.
Please do the following:
- Open IIS Management console
- Navigate to Web Service Extension node
- Make sure that ASP.Net 2.0.50727 (or similar) is enabled
- Keep IIS Manager opened for now.
So your page is back, but where you should see your CrystalReportViewer control there is nothing. Most likely there would an JS error detected on the page “bobj is undefined”.
You would need to check that there is “crystalreportviewer12” virtual folder is present in your site tree. In most cases it should be there, since it is part of CR redistribution package logic. If you have not included it with your setup and/or installed CR support through different means, then you would need to add this virtual folder yourself.
And validate folder created
Another way if you share CR installation between different sites would be to use Export/Import folder info functionality to copy VF info between sites.
Hopefully by that point your CR based web-site should be up and running.