Skip to Content
0

CrystalReportViewer in VS2017, all images show as a Black X

Nov 08, 2017 at 03:01 PM

207

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Jay Lockhart Nov 15, 2017 at 08:09 PM
0

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.


qjnqo.png (21.7 kB)
Show 2 Share
10 |10000 characters needed characters left characters exceeded

Of interest...after going through the Fiddler traces: I made to changes to get the project to find crystalreportviewer13.

1. Removed the tilde in the value

<addkey="resourceURI" value="/crystalreportviewers13"/>

2. Placed the crystalreportviewer13 folder in the root of the project, and in the folder (Print.UI) of the asp page that calls the Crystal Reports, and gave IIS_IUSRS read and write access. Notice that in the trace it looks for both places.

Still have the one error on CrystalImageHandler.aspx
s4sus.png (71.6 kB)
0

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.

0
Don Williams
Nov 08, 2017 at 04:31 PM
0

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

Show 2 Share
10 |10000 characters needed characters left characters exceeded

CRforVS_13_0_21

Also, I have Crystal Reports 11.5.12.1838
0

Any ideas or help would be appreciated.

0
Don Williams
Nov 09, 2017 at 08:51 PM
0

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

Show 4 Share
10 |10000 characters needed characters left characters exceeded

I tried adding IIS_IUSRS and DefaultAppPool both to have read/write access to the crystalreportviewers13 in IIS. Then tried copying the folder to the application, and granting the same rights there. No Go. Still black X.

0

So I reinstalled the report viewer. Copied the crystalreportviewers13 folder from C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319 into the root of my web project...IE:

C:\Applications\RRCC\RRCC.UI.Web. Gave IIS_IUSRS read/write access. Put the following code in my Web.config:

<businessObjects>
<crystalReports>
<crystalReportViewer>
<add key="documentView" value="weblayout"/>
<add key="processingIndicatorText" value="Loading..."/>
<add key="resourceUri" value="~/crystalreportviewers13"/>
</crystalReportViewer>
<rptBuildProvider>
<add embedRptInResource="true"/>
</rptBuildProvider>
</crystalReports>

</businessObjects>

Stilling getting black X. The text part of the report does display as expected...just not the images.
0

Still having issues...tried everything I can think of. Can we hookup and walk through it sometime?

0

No direct contact through this Forum, you would need to purchase a single case.

Use Fiddler, it will show you where your access permissions or missing dependencies are.

Don

0