Convert Crystal Report to PDF File

Deat all,

   I have created few reports using Crystal Report 9 for my application, the reports are deployed to user to preview it. I'm thinking of converting the reports into PDF format at the server side then pass then PDF file to the client side to preview. Can this be done ?

Subject: Convert Crystal Report to PDF File

S it can be done.You can create a exe file (in VB) and keep it on the server on that crystal reports should also be installed then get the values and pass it to the exe file and launch it.

Subject: Convert Crystal Report to PDF File

There is a product called OctoPDF sold by JBMSystems.com. It accepts LPR input and kicks PDF’s out the back end. They have burst tools, forms flash and all kinds of add ons and features. We have many reports that we just push out to different queue’s and they end up in the user’s email box. Relatively Inexpensive.

Subject: RE: Convert Crystal Report to PDF File

We implemented this functionality in one of my projects an year back. I think, u need to have the crystal report client installed and running at server side. Dont remember! Hope this sample code help u.

Set App = CreateObject(“CrystalRuntime.Application”)

SorcePath = SorcePath+RptFileName



Set Rep = App.OpenReport(SorcePath)	

Dim UserName As New NotesName(RPTUserName)

Rep.Database.Tables(1).SetLogOnInfo rptdb.Server, "", UserName.Abbreviated, Password	

Rep.ParameterFields(1).AddCurrentValue ParVal

CDateTime = Cstr(Right("0000" + Year(Now),4)) + Cstr(Right("00" + Month(Now),2)) + Cstr(Right("00" + Day(Now),2)) +_

Cstr(Right("00" + Hour(Now),2)) + Cstr(Right("00" + Minute(Now), 2))

FileName = PdfFileName + "For-Y"+Cstr(Year(Today))+"-M"+Cstr(Month(Today))+"-D"+CDateTime



Set CRExport = Rep.ExportOptions

ExportType= "PDF"

DesPath = DesPath + FileName

CRExport.FormatType = CREFTPortableDocFormat

CRExport.DestinationType = CREDTDISKFILE	

CRExport.DiskFileName = DesPath+ ".pdf"

CRExport.PDFExportAllPages = True

DesPathFull=DesPath+".pdf"

Rep.Export False

Subject: RE: Convert Crystal Report to PDF File

Hi Johny, I have tried to use the script that you posted, but it shows the error

Crystal Reports ActiveX Designer : Error In File : Missing or out-of-date export DLL.

Do you know what caused the error ?

Subject: RE: Convert Crystal Report to PDF File

Ching Chee Tan,

I am not sure about this error. I dont have crystal report with me to try it out. Are you able to export it manually. I mean, open the crystal report, use its menu options to export to excel or pdf. If you are getting the same error on this manual export means, its the istallation of crystal report causing the problem.