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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with printing Crystal Report into a .pdf file from VB 1

Status
Not open for further replies.

20132

Programmer
Apr 19, 2002
21
US
I need to print Crystal Report into a .pdf file from VB6 application silently in the background and save the file on the drive.
Can someone post a sample of the code. This question has been frequently asked, but I couldn't find a straight answer to it.

Thank you

 
Hi,

You can print a Crystal Report or Access Report in to a PDF file using "ACG PDF & Mail" component. Here is the sample code . Tryit out....

Regards
eswarn@lycos.com

Dim objPDF As New PDFClass

With objPDF
.ReportName = strrptname ' Your Report Name
.ImageType = "PDF"
.PDFNoShowPropDlg = True
.outputfile = "c:\Reports\" &strrptname & ".pdf"
.PrintImage
lngResult = .result
End With
 
Thank you very much!!!
Can you please explain how to add the "ACG PDF & Mail" component. I am currently using Distiller to print from PowerPoint to PDF in my app. I've tryed running your code using the Distiller, but got an error message: "PDFClass not defined".

 
Hi Guys.....
anybody there to help me in this regard ?????????

am looking to convert Crystal reports to PDF.

any help would be appreciated ! ! !
 
Crystal Reports 8.5 and later has an export to PDF.
Just need to add report in VB (VB6.0) program and then run it.
 
yah....8.5 and above has that export option

how abt 7.0 ? any other options than export ?
thx
 
Get a PDF printer driver and set that printer as the Default Printer. One that I use that can automtically name the files as printed is DocuCom PDF Driver.


Hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top