【发布时间】:2021-03-21 15:21:15
【问题描述】:
Dim crp As New CRAXDRT.Application
Dim rep As CRAXDRT.Report
Set rep = crp.OpenReport(GlbRepPath + "indent_rep.RPT")
rep.ExportOptions.Reset
rep.EnableParameterPrompting = False
rep.DiscardSavedData
rep.ExportOptions.PDFExportAllPages = True
rep.RecordSelectionFormula = "{I_IndentheadT.IND_NO}='" + txtIndentNo.Text + "'"
vFileName = Left(txtIndentNo.Text, 3) + Right(txtIndentNo.Text, 6) + ".pdf"
rep.ExportOptions.DiskFileName = "d:\indent.pdf" 'App.Path & "\" & vFileName
rep.ExportOptions.DestinationType = crEDTDiskFile
rep.ExportOptions.FormatType = crEFTPortableDocFormat
rep.DisplayProgressDialog = False
rep.Export False
我的代码用于将水晶报表从 VB6 转换为 pdf。最后一行给出错误“找不到文件”
【问题讨论】:
-
尝试使用不同的文件位置或将最后一行代码更改为 rep.Export True 看看会发生什么。
-
感谢史密斯您的及时回复。我都试过了,但同样的错误。
-
GlbRepPath的值是多少?您确定该值以反斜杠结尾吗? -
是的,它以反斜杠结尾
标签: pdf crystal-reports vb6