cancel
Showing results for 
Search instead for 
Did you mean: 

Deploy Crystal 2016 to ASP.NET Server

joe_mancini
Explorer
0 Kudos

I'm using Visual Studio 2017 with Crystal 2016 to create an ASP.NET project. I created a Report which displays fine locally when I run it within Visual Studio.

When I publish to the web server and try to run the page, I only get a white screen. I've seen many threads and solutions, but nothing is working for me.

What I've done so far on the server/code:

Installed Crystal Reports runtime engine for .NET framework

I copied the files from C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\crystalreportviewers13 into a folder in my VS project.

Added this line to the main, and only .aspx page in the project:

    <script type ="text/javascript" src="/crystalreportviewers13/js/crviewer/crv.js" ></script> 

Added this to web.config - I tried both lines of the '<add key...' below, but neither work.

  <configSections>
    <sectionGroup name="businessObjects">
      <sectionGroup name="crystalReports">
        <section name="rptBuildProvider" type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.3500.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="UseBrowserLocale" value="true"/>
        <add key="ResourceUri" value="/crystalreportviewers13" />
      <!--<add key="resourceURI" value="/aspnet_client/system_web/4_0_30319/crystalreportviewers13" />-->           
      </crystalReportViewer>
    </crystalReports>
  </businessObjects>

I already have another VS 2017 application(just not with Crystal) installed on the same web server and that works fine. I did throw in a textbox at one point below the Crystal Viewer as a test, and that does show up when running on the Web Server, so this leads me to believe it's some Crystal issue. Also, I have this solution currently deployed to another web server, though that solution is using VS 2010 and Crystal 2008, but it is working fine.

What else do I need to make sure I have or can I try?

Accepted Solutions (1)

Accepted Solutions (1)

joe_mancini
Explorer
0 Kudos

Found the answers to my issue.

In the web.config, within the <CrystalReportViewer> tag, when running on desktop in Debug, use this line:

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

When publishing to web server, change to:

<add key="resourceURI" value="/aspnet_client/system_web/4_0_30319/crystalreportviewers13" />

In the main .aspx webform, this is what I needed to for running in Debug on Desktop and for publishing to the Web Server:

   <% #If DEBUG %>
<%--    Use line below for debugging on the desktop --%>
    <script type ="text/javascript" src="/crystalreportviewers13/js/crviewer/crv.js" ></script>               
<% #else %>
<%--    Use line below for publishing to web server --%>
    <script type ="text/javascript" src="../aspnet_client/system_web/4_0_30319/crystalreportviewers13/js/crviewer/crv.js" ></script>                     
<% #end if %>

Answers (0)