Skip to Content

CrystalReportViewer in VS2017, all images show as a Black X

Images show as a Black X

Added the following References:
CrystalDecisions.CrystalReports.Engine,
CrystalDecisions.Shared
CrystalDecisions.Web

Added to web config <configSection>:
<sectionGroupname="businessObjects">
<sectionGroupname="crystalReports">
<sectionname="crystalReportViewer"type="System.Configuration.NameValueSectionHandler"></section>
<sectionname="printControl"type="System.Configuration.NameValueSectionHandler" />
<sectionname="rptBuildProvider"type="CrystalDecisions.Shared.RptBuildProviderHandler, CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304, Custom=null"/>
</sectionGroup>
</sectionGroup>

Added to web config <appSettings>:
<add key="CrystalImageCleaner-AutoStart" value="true" />
<add key="CrystalImageCleaner-Sleep" value="60000" />
<add key="CrystalImageCleaner-Age" value="120000" />

Added to web config <configuration>:
<businessObjects>
<crystalReports>
<crystalReportViewer>
<add key="resourceUri" value="~/crystalreportviewers13"/>
</crystalReportViewer>
<printControl>
<add key="url" value="http://localhost/PrintControl.cab" />
</printControl>
<rptBuildProvider>
<add embedRptInResource="true"/>
</rptBuildProvider>
</crystalReports>
</businessObjects>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<handlers>
<add name="CrystalImageHandler.aspx_GET" verb="GET" path="CrystalImageHandler*" type="WebReporting.Code.CrystalImageHandler, WebReporting, Version=1.0.0.0, Culture=neutral" preCondition="integratedMode" />
</handlers>
</system.webServer>

Added to web config <system.web>:
<httpHandlers>
<add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
</httpHandlers>

blank-image.png (9.0 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Nov 15, 2017 at 08:09 PM

    5 of the errors are on :[Fiddler] DNS Lookup for "crystalreportviewers13" failed. System.Net.Sockets.SocketException No such host is known

    Then 1 error: Could not load file or assembly 'WebReporting, Version=1.0.0.0, Culture=neutral' or one of its dependencies. The system cannot find the file specified

    The crystalreportviewers13 folder is located under the Print.UI forder, and IIS_IUSRS has read/write access to it.

    Add comment
    10|10000 characters needed characters exceeded

    • OK...Got it to work. The only other changes:

      Remove from Web.config:

      <httpHandlers>

      <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=13.0.3500.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>

      </httpHandlers>

      Created a new CrystalImageHandler.aspx.cs in the Print.UI folder and added the following code to the Page_Load:

      CrystalDecisions.Web.CrystalImageHandler crystalImageHandler = new CrystalDecisions.Web.CrystalImageHandler();

      crystalImageHandler.ProcessRequest(Context);

      Images are displaying now.

  • Nov 08, 2017 at 04:31 PM

    What version of CR for VS patch are you using?

    Go here for the latest update:

    https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 09, 2017 at 08:51 PM

    Problem is your app cannot find the CR Viewer 13 folder

    Add the folder to your app or give IIS full read/write permissions to it:

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

    Add comment
    10|10000 characters needed characters exceeded