Tuesday, 7 January 2014

How to deploy Web Application that uses Crystal Report?

We faced lot of problems when we created Crystal Reports and deployed the pages on the server. The page would display but the Report wouldn't.

Please follow the following steps to display the Crystal Reports on pages deployed on the server.

  1. Go to “C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319″ on the web server.
  2. Copy “crystalreportviewers13″ folder & paste it to the application


Now add the following lines in the web.config file

  <configSections>
    <sectionGroup name="businessObjects">
      <sectionGroup name="crystalReports">
        <section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
        <section  name="crystalReportViewer" type="System.Configuration.NameValueSectionHandler" />
      </sectionGroup>
    </sectionGroup>
  </configSections>
   <businessObjects>
    <crystalReports>
      <rptBuildProvider>
        <add embedRptInResource="true" />
      </rptBuildProvider>
      <crystalReportViewer>
        <add  key="ResourceUri" value="/crystalreportviewers13" />
      </crystalReportViewer>
    </crystalReports>

  </businessObjects>




This should work.





No comments:

Post a Comment