cancel
Showing results for 
Search instead for 
Did you mean: 

Export to Pdf: Image not shown

Former Member
0 Kudos

I'm a newbie with Crystal Report.

I'm trying to export a loaded Crystal report document in C# to pdf.

I have a image in the document but it will not show. The Image path is an url.

If I export it to CrystalReport format it works fine and the image is shown.

crdoc.ExportToDisk(ExportFormatType.CrystalReport, logPath + debugFileName + "_1.rpt");

If I export it to Pdf format it will not work.

crdoc.ExportToDisk(ExportFormatType.PortableDocFormat, logPath + debugFileName + ".pdf");

I also tried to export the document like this

ExportOptions crExportOptions = new ExportOptions();

DiskFileDestinationOptions crDiskFileDestinationOptions = new DiskFileDestinationOptions();

crDiskFileDestinationOptions.DiskFileName = logPath + debugFileName + "_2.pdf";

crExportOptions.DestinationOptions = crDiskFileDestinationOptions;

crExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

crExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;

crdoc.Export(crExportOptions);

The refrences i'm using is

CrystalDecisions.CrystalReports.Engine vers. 11.5.3700.0

CrystalDecisions.Enterprise.Framework vers. 11.5.3300.0

CrystalDecisions.Enterprise.InfoStore vers. 11.5.3300.0

CrystalDecisions.ReportSource vers. 11.5.3700.0

CrystalDecisions.Shared vers. 11.5.3700.0

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Can you export the report successfully to PDF from the CR designer?

Is this a win or a web app?

Ludek

Former Member
0 Kudos

It's a Web app and I can export the report successfully to PDF in the CR designer.

Edited by: midvinter on Mar 19, 2009 3:46 PM

former_member183750
Active Contributor
0 Kudos

Since this is a web app and CR works and the image path is an url, I'd suspect some type of permissions issue (irrespective of this working for CR export format). I recommend you use Process Monitor to determine what permissions are missing. ProcMon can be downloaded from here:

http://technet.microsoft.com/en-ca/sysinternals/bb896645.aspx

Ludek

Former Member
0 Kudos

Thanks for the advice.

I tried ProcMon, but could not see any access denied on any file. Now I'm writing a App to see if I could get this to work.

former_member183750
Active Contributor
0 Kudos

Is there anything in the PDF export, like a red x or something that would reveal where the PDF "thinks" it should be looking for the image? (if there is, right clik, properties, etc...?)

Ludek

Former Member
0 Kudos

No, red(x) or anything i shown where image sholuld be.

I'm devoloping in VS2008 and CR XI. Could that be the problem?

former_member183750
Active Contributor
0 Kudos

I'm developing in VS2008 and CR XI. Could that be the problem?

Absolutely. Only CR 10.5 which ships with .NET 2008 and CR 2008 SP0 or higher are supported in .NET 2008.

Ludek

BTW., do not recommend using reports created in CR XI with the 10.5 runtime either (in case you're thinking of downgrading to CR 10.5)

Former Member
0 Kudos

Thanks I will upgrade to CR 2008.

/Stefan

Former Member
0 Kudos

I found a solution to this problem:

1200904 - A dynamic image from an HTTP source does not appear in a .NET application

Symptom

A dynamic image from an HTTP source does not appear in a .NET application deployed to a production system.

Cause

This problem occurs because the library file libcurl.dll is missing from the Business Objects bin directory. The libcurl.dll is not included in the .NET merge modules for Crystal Reports XI and Crystal Reports XI Release 2.

Crystal Reports XI Release 2

1. Find the libcurl.dll on the development system in C:\Program Files\Business Objects\Common\3.5\bin.

2. Copy and paste libcurl.dll to C:\Program Files\Common Files\Business Objects\3.5\bin on the production system.

former_member183750
Active Contributor
0 Kudos

Much appreciated this being shared. I'll see if has been tracked in the QA database too.

Still, if you do plan on using .NET 2008, do consider going to CR 2008. I can almost guarantee that sooner or later, using CR XI with .NET 2008 will come back to haunt you.

Ludek

Answers (0)