我尝试使用此VBA代码从Crystal Report创建PDF:
Dim appl As New CRAXDRT.Application
Dim Rep As New CRAXDRT.Report
Set Rep = appl.OpenReport(pStrRapport)
Rep.ExportOptions.DiskFileName = pStrFichier
Rep.ExportOptions.DestinationType = crEDTDiskFile
Rep.ExportOptions.FormatType = crEFTPortableDocFormat
Rep.Export False
Crystal Reports似乎打开但后来我得到了错误,然后什么都没有。
数据库连接器错误:'[数据库供应商代码:39]'
你们有没有想到error code 39
的原因是什么?
答案 0 :(得分:0)
Crystal Report似乎不管理多个数据源。我在Crystal Report中收到了警告,但PDF中的导出效果很好。似乎VBA不喜欢这个警告。 我将重组我的数据源,将所有表都放在一个数据库中。
谢谢!