Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Instructions for exporting to .pdf from ASP.NET

Status
Not open for further replies.

croydon

Programmer
Apr 30, 2002
253
0
0
EU
Does anyone know where I can find instructions for exporting a report to a .pdf from Crystal Reports.NET?

I have created a report in CR.NET within Visual Studio.NET. I then created an ASP.NET (VB.NET) page to display the results using the Viewer.

I would now like to export this to a .pdf but I cannot find any instructions to do this.

Any help would be appreciated.
 
Once you have your included references just add this code

Dim DiskOpts As CrystalDecisions.Shared.DiskFileDestinationOptions = New CrystalDecisions.Shared.DiskFileDestinationOptions()
("Report").ExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
("Report").ExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
DiskOpts.DiskFileName = "File location & name" & ".pdf"
("Report").ExportOptions.DestinationOptions = DiskOpts
("Report").Export()



Remember, today is a race between developers trying to build bigger and better idiot-proof programs and the Universe, trying to produce bigger and better idiots......So far Universe 1 Developers 0

 
Katy44, crdapper, thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top