Author | Topic: Crystal report ActiveX | |
---|---|---|
IBA | Crystal report ActiveX on Sun, 10 Oct 2010 16:45:07 -0700 Hi, What is the correct syntax for saving crystal report as a PDF? Many thanks, -Itai | |
Erik Dobrie | Re: Crystal report ActiveX on Tue, 12 Oct 2010 10:42:28 -0400 oReport:ExportOptions:FormatType:=nFormat //31=PDF 39=editable rtf 29=excel "IBA" <iba@adelphia.net> wrote in message news:7f6e009c$56f73ddb$1db1b@news.alaska-software.com... > Hi, > > What is the correct syntax for saving crystal report as a PDF? > > Many thanks, > > -Itai > > | |
IBA | Re: Crystal report ActiveX on Thu, 14 Oct 2010 18:05:48 -0700 Eric, Thank you for the post. The ::ExportOptions:FormatType only affect the export options of the viewer. It does not save the report as PDF. I believe we'll need more than just one line to perform this task. My problem is that I'm not familiar with all of the properties and correct syntax of Crystal ActiveX. I'd like to create the report and save is as PDF instead of displaying it on screen. Many thanks for your help. -Itai | |
Erik Dobrie | Re: Crystal report ActiveX on Fri, 15 Oct 2010 09:50:06 -0400 This saves the report to PDF on disk and the Tables section is specific to MSSQL. oCrystal := ActiveXObject():create( "CrystalRuntime.Application.11" ) oreport:=oCrystal:openreport(cFile) oReport:Database:Tables(1):ConnectionProperties:DeleteAll() oReport:Database:Tables(1):ConnectionProperties:Add("Provider","xxx") oReport:Database:Tables(1):ConnectionProperties:Add("Data Source","xxx") oReport:Database:Tables(1):ConnectionProperties:Add("Initial Catalog","xxx") oReport:Database:Tables(1):ConnectionProperties:Add("User ID","xxx") oReport:Database:Tables(1):ConnectionProperties:Add("Password","xxx") oReport:RecordSelectionFormula := cQuery oReport:ReportComments := cComment oReport:ExportOptions:DiskFileName:=cOutFile oReport:ExportOptions:DestinationType:=1 oReport:ExportOptions:FormatType:=nFormat //31=PDF 39=editable rtf 29=excel oReport:EXPORT(.F.) oReport:destroy() oCrystal:destroy() "IBA" <iba@adelphia.net> wrote in message news:676d6aec$7032bbbf$8e040@news.alaska-software.com... > Eric, > > Thank you for the post. > > The ::ExportOptions:FormatType only affect the export options of the > viewer. It does not save the report as PDF. I believe we'll need more > than just one line to perform this task. My problem is that I'm not > familiar with all of the properties and correct syntax of Crystal ActiveX. > I'd like to create the report and save is as PDF instead of displaying it > on screen. > > Many thanks for your help. > > -Itai > > |