I am using Visual Basic 6. And my report is using Crystal Report 8.5 to develope. I am doing the Windows application using VB6.
On my windows application, when I click on the preview button, I will use the below coding to export my crystal report to PDF file, and use Adobe Reader to open the PDF file.
Private Sub PrintReport()
Dim crReport As New cr_po
crReport.ExportOptions.ApplicationFileName = "C:\Purchase_Order.pdf"
crReport.ExportOptions.DestinationType = crEDTApplication
crReport.ExportOptions.DiskFileName = "C:\Purchase_Order.pdf"
crReport.ExportOptions.PDFExportAllPages = True
crReport.ExportOptions.FormatType = crEFTPortableDocFormat
When the report being view in the adobe reader. Then I go to my windows application and click the "Preview" button again, it will having an error by saying that
" Run-time error '-2147206452 (80043acc)' "
The file is use by another application.
I know this is because of the PDF file is being open, my another PDF file is creating and using the same file name. I just want to know is there any other way to view the Crystal Report file in PDF?
Thanks & Best regards.