Sunday, January 21, 2018

Crystal Report is not rendering/showing/runing in localhost visual studio

Crystal report is not loading in browser, due to windows update, little workaround is required to get this issue fix.

Step1.  If crystal report is installed on your system go to following path.

C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13

copy the folder "crystalreportviewers13" and paste in application root folder

Step2. Go to web.config file. modify section group in this way.




<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="/ERPWeb/crystalreportviewers13" />
      </crystalReportViewer>
    </crystalReports>
  </businessObjects>
 


The key value will be defined in the way



http://localhost:36409/ERPWeb//ERPWeb/crystalreportviewers13

<add key="ResourceUri" value="/ERPWeb/crystalreportviewers13" />