Hi all,
We purposely bought Crystal Reports Developer v. 8.5 so we could export our reports to PDF format.
I've been trying to get the sample reports to export to PDF, with no luck. Crystal Tech support has not been very helpful, either.
I ran their sample report from aspxmps85.exe (SimpleReportExport.asp) and it appeared to work, redirecting to the sample .doc file. However, I noticed that when I deleted that .doc file, I would get a file not found error (because the report wasn't exporting!). I tested to see whether the report was actually retrieving anything in the asp page by inserting the report viewer include, and it displayed fine. So, for some reason even their code is not exporting.
In their sample file, SimpleReportExport, I have modified their export code to the following, in order to export to PDF:
ExportFileName = "ExportedReport.pdf"
Path = Request.ServerVariables("PATH_TRANSLATED"
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
'The While/Wend loop is used to determine the physical location
'of the SimpleReportExport.asp so that we can save the
'ExportedReport.doc in the same location.
ExportDirectory = Path
ExportType = "31"
CrystalExportOptions.DiskFileName = ExportDirectory & ExportFileName
'This line of code specifies the physical location and file name to give
'the export result.
CrystalExportOptions.PDFExportAllPages True
CrystalExportOptions.UseReportNumberFormat True
CrystalExportOptions.UseReportDateFormat True
CrystalExportOptions.FormatType = CInt(ExportType)
'This line of code specifies the export format (in this case MS Word).
CrystalExportOptions.FormatDLLName "crxf_pdf.dll"
CrystalExportOptions.DestinationType = CInt(1)
'This line of code specifies that the export destination is to be disk.
Session("oRpt".Export False
'This line of code turns of any prompting when exporting.
Response.Redirect ("ExportedReport.pdf"
Please, can anyone help me with this problem, it's becoming very annoying!
We purposely bought Crystal Reports Developer v. 8.5 so we could export our reports to PDF format.
I've been trying to get the sample reports to export to PDF, with no luck. Crystal Tech support has not been very helpful, either.
I ran their sample report from aspxmps85.exe (SimpleReportExport.asp) and it appeared to work, redirecting to the sample .doc file. However, I noticed that when I deleted that .doc file, I would get a file not found error (because the report wasn't exporting!). I tested to see whether the report was actually retrieving anything in the asp page by inserting the report viewer include, and it displayed fine. So, for some reason even their code is not exporting.
In their sample file, SimpleReportExport, I have modified their export code to the following, in order to export to PDF:
ExportFileName = "ExportedReport.pdf"
Path = Request.ServerVariables("PATH_TRANSLATED"
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
'The While/Wend loop is used to determine the physical location
'of the SimpleReportExport.asp so that we can save the
'ExportedReport.doc in the same location.
ExportDirectory = Path
ExportType = "31"
CrystalExportOptions.DiskFileName = ExportDirectory & ExportFileName
'This line of code specifies the physical location and file name to give
'the export result.
CrystalExportOptions.PDFExportAllPages True
CrystalExportOptions.UseReportNumberFormat True
CrystalExportOptions.UseReportDateFormat True
CrystalExportOptions.FormatType = CInt(ExportType)
'This line of code specifies the export format (in this case MS Word).
CrystalExportOptions.FormatDLLName "crxf_pdf.dll"
CrystalExportOptions.DestinationType = CInt(1)
'This line of code specifies that the export destination is to be disk.
Session("oRpt".Export False
'This line of code turns of any prompting when exporting.
Response.Redirect ("ExportedReport.pdf"
Please, can anyone help me with this problem, it's becoming very annoying!