THE PUTXI PROJECT

Catalonia is Not Spain

Create PDF from CrystalReport

Posted by putxi on April 18, 2007

The following code explains how to create a PDF File when you have a CrystalReport

You must use this namespace : using CrystalDecisions.Shared;

CrystalReport2 crReport = new CrystalReport2();
ExportOptions crExpOpt = crReport.ExportOptions;
DiskFileDestinationOptions crExpDest = new DiskFileDestinationOptions();
crExpDest.DiskFileName = “c:\\myexportedreport.pdf”;

crExpOpt.ExportDestinationType = ExportDestinationType.DiskFile;
crExpOpt.ExportFormatType = ExportFormatType.PortableDocFormat ;

crExpOpt.DestinationOptions = crExpDest;
crReport.Export();

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: