How to deploy Crystal Reports 2008 project – part 2

Introduction

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…

Installation notes

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.

This entry was posted in Crystal Reports and tagged , , , , , , , , . Bookmark the permalink.

5 thoughts on “How to deploy Crystal Reports 2008 project – part 2”

  1. Jose Silva says:

    My conclusions
    Simply adding the virtual directory is no enough. You need to add this tag on all the pages where you are using a report:
     
    <script language=”javaScript” type=”text/javascript” src=”/crystalreportviewers12/js/crviewer/crv.js”></script>

    I also redirected the virtual directory to the folder located on C:\Inetpub\wwwroot\aspnet_client\system_web\2_0_50727\crystalreportviewers12.

    This worked for me.

    Thanks for the help

  2. DenMan says:

    I did this all on the server, but it still did not work. After looking at some websites, one came up with the solution for me….
    Add this to your web.config file
    <sectionGroup name=”businessObjects”>
    <sectionGroup name=”crystalReports”>
    <section name=”crystalReportViewer” type=”System.Configuration.NameValueSectionHandler” />
    </sectionGroup>
    </sectionGroup>
     
    <businessObjects>
    <crystalReports>
    <crystalReportViewer>
    <add key=”resourceURI” value=”~/crystalreportviewers12″ />
    </crystalReportViewer>
    </crystalReports>
    </businessObjects>
     
     
     

  3. Sam says:

    Is that same for Cr vs 13?..

  4. Could be, not tested

Leave a Reply

  • About

    From being a junior developer all the way to Development Manager position, I was always interested in new technologies. Passionate speaker, IT junky, developer, architect, team lead, and development manager - many hats, one goal - making software better and closer to people’s needs. For the most part I am using my blog as a scratch pad, writing small articles on things which I came across, was asked about more then once, and which would otherwise require additional research again and again.

    View Serguei Dosyukov's profile on LinkedIn
  • Testimonials

    I’m a huge fan of this theme. I’ve got more than 90,000 pictures in my gallery3 running on a Ubuntu...

    Jklobo

    I've been using this [theme] since the start. It is by far the most attractive, feature packed and stable of...

    Rhyull

    The greydragon theme is fantastic. It’s clean, stable and feature rich. It took me a while to decide to move...

    Ed

    more...

  • Categories