Sorry for posting wrong code in previous message , here is the actual code
Dim appl As New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Set rep = appl.OpenReport("c:\temp\addrbook.rpt", 1)
rep.ExportOptions.DiskFileName = "c:\temp\pdf_report.pdf"
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.Export (False)
Thanks
Ravi.
> Hello,
> I am trying to convert Report in RPT format to PDF format using the
f> ollowing peice of code in VB.
> Dim appl As New CRAXDRT.Application
D> im rep As CRAXDRT.Report
>
S> et rep = appl.OpenReport("c:\temp\addrbook.rpt", 1)
r> ep.ExportOptions.DiskFileName = "c:\temp\pdf_report.html"
r> ep.ExportOptions.DestinationType = crEDTDiskFile
'> rep.ExportOptions.FormatType = crEFTPortableDocFormat
r> ep.ExportOptions.FormatType = crEFTNoFormat
r> ep.Export (False)
> but i am getting an exception "saying missing or out-of-date DLL".I
c> hecked for u2fpdf.dll and I do not have it. Could any of you suggest a
w> ork around to this problem.
> Thanks
R> avi.
>
>> Jawahar,
>>
>> I do not think that there is a
>> way to import an access report into
>> crystal reports. But here is the code
>> call I use to change the default setting
>> in a Win 95/98 machine:
>>
>> This is the procedure declaration
>> ----Begin Code-----
>> Declare Function WritePrivateProfileString Lib "kernel32" Alias
>> "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal
>> lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String)
As
L> ong
>> -----End Code-----
>>
>> This is the code to specify file name and path
>> ----Begin Code-----
>> Dim RC as Long
>> RC = WritePrivateProfileString("Acrobat PDFWriter", _
>> "PDFFileName", "<Your path & filename here>",
>> "c:\windows\system\pdfwritr.ini")
>> -----End Code-----
>>
>>
>> Also if you decide to you want to make your
>> printout landscape here is the code:
>>
>> -----Begin Code-----
>> RC = WritePrivateProfileString("Acrobat PDFWriter", _
>> "orient", "2", "c:\windows\system\pdfwritr.ini")
>> -----End Code-----
>>
>> Here is the code to reset the parameters
>>
>> -----Begin Code-----
>> 'Reset Adobe Print Parameters
>> RC = WritePrivateProfileString("Acrobat PDFWriter", _
>> "PDFFileName", "", "c:\windows\system\pdfwritr.ini")
>> RC = WritePrivateProfileString("Acrobat PDFWriter", _
>> "orient", "", "c:\windows\system\pdfwritr.ini")
>> -----End Code-----
>>
>> For WinNT and Win2000, there are registry settings
>> that handle this. Let me know if you need the
>> code for that, I will hunt it down for you.
>>
>> Cardyin
>>
>> PS. It's Mr. Kim :)
>>
>> --------------------------------------
>> Cardyin Kim
>> System Analyst - Information Services
>> San Antonio Community Hospital
>> ckim@s... (xxx)xxx-xxxx
>> --------------------------------------
>>
>>
>> -----Original Message-----
>> From: Jawahar Rajan [mailto:jawahar@b...]
>> Sent: Thursday, January 25, 2001 7:35 PM
>> To: professional vb
>> Subject: [pro_vb] RE: PDF convert tool
>>
>>
>> Ms Kim
>> Thanks for your responses.
>> My reports are all in MS Access so at present I am going to try with
the
>> Adobe PDFWriter. How ever I am not able to specify the path correctly
e> ach
>> time the pdf reports end up in a different folder! I also see that it
p> rints
>> to LPT1 then I cannot specify a Shared drive!
>> I do agree that Crystal Reports option is the Best, but alas for this
>> project I am stuck with MS access reports
>> Can MS reports be imported into Crystal?
>>
>> Thanks
>> Jawahar