Question

You can enter a URL in a Crystal Reports image Graphic Location field to allow Crystal to load it dynamically at runtime. Eg: http://reports.server.com/logo.png or {?_pUrl} & "/logo.png"

Are you able to use a secure / HTTPS URL? Eg: https://reports.server.com/logo.png


I've verified outgoing HTTP connections using the TCP/IP tab of Process Explorer, but can't see any outgoing connections when using HTTPS.

My actual report is passing the base URL in via a parameter and works in an HTTP only environment. Also tried using a hard coded HTTPS url, to no avail.

I'm using version 14.0.2.364 RTM hosted in IIS on a 2012 R2 server.

Was it helpful?

Solution

Looks like Crystal Report 14.0.X (and earlier) does not support HTTPS Graphic Location - official reference from 2013.16.01.

Also checkout this thread (from 2013.Feb) where it's mentioned again Graphic Location formula over HTTPS is not supported.

Unfortunately it seems the issue is still not resolved.

The common suggested workarounds in the SAP's threads are:

  • using HTTP instead of HTTPS

  • having the image loaded locally (or from shared location)

  • use 3rd party tools to pre-download and store the image from the https to another (local) secure location.

OTHER TIPS

It's not supported.

A SAP employee confirms this in this thread in the SAP community network (though it relates to an older version):

You're using the "Graphic Location" formula to specify a URL for the image. When you return a string with http://, it's working, but not with https://.

That's currently the behavior in Crystal Reports 2008 Designer, and CR4E CRJ SDK reflects that behavior. [...] it's likely not something that would be implemented in CR4E in the near future.

This also seems to be the case in CR2011 (14.0.x), as stated in another thread:

if the URL is secured one eg. HTTPS then crystal report wont be able to process the images. Because HTTPS graphic location is not supported.

A list of possible work-arounds to this problem:

  • Use HTTP rather than HTTPS (you may need to whitelist a particular URL or route if you require all access to be via HTTPS)

  • Pass the image via a binary field in your query (either by pushing it in via a dataset or by pulling it from your database)

  • Load images from a local filesystem

in Web.config, create a rule in the URL Rewrite, to exclude the file that generates the image, like this:

<system.webServer>
<rewrite>
  <rules>
    <rule name="HTTP to HTTPS redirect" stopProcessing="true">
      <match url="(.*)" />
      <conditions>
        <add input="{HTTPS}" pattern="off" ignoreCase="true" />
        <add input="{REQUEST_URI}" matchType="Pattern" pattern="\bBarcode.ashx\b" ignoreCase="true" negate="true" /> <!-- Crystal não suporta imagens https.. Criando exceção para imagens de barcode, utilizadas no crystal -->
      </conditions>
      <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
    </rule>
  </rules>
</rewrite>
</system.webServer>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top