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

Export False fails

Status
Not open for further replies.

demoman

Programmer
Oct 24, 2001
242
US
I am writing a VB program to automatically export a crystal 10 report to a PDF file and then e-mail it. Life is wonderful until I execute the:

.Export False

I get an error message that says "Missing or out-of-date export dll.

If I remove the 'False' argument, it prompts me for the filename/location, etc and works fine. But, I do not want the user to have to go through this for a hundred plus reports. The False should work.

In looking at my system, I have the ExportModeller.dll and crtslv.dll both loaded and registered.

Anyone run into this before?
 
Since it's working without False, perhaps you are not providing the export file name? Tough to tell without seeing the code...

hth,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Here is the code:

Public Sub Main()

Set crxApplication = New CRAXDRT.Application
Set report = New CRAXDRT.report
Dim sect As CRAXDRT.Section
Dim defs As CRAXDRT.ParameterFieldDefinitions
Dim defStart As CRAXDRT.ParameterFieldDefinition
Dim defEnd As CRAXDRT.ParameterFieldDefinition
Dim def As CRAXDRT.ParameterFieldDefinition
Dim rptObject As Object
Dim subReport As SubreportObject
Dim subRep As CRAXDRT.report
Dim strReport As String


frmReportView.Visible = False

strReport = "Z:\CrystalReportApps\DiversionReport\Test.rpt"

If Not objFso.FileExists(strReport) Then
Beep
MsgBox "The report you requested cannot be located by this shortcut. Contact IT"
Set crxApplication = Nothing
Set report = Nothing
Set objFso = Nothing
End
End If

strUser = LoginName

Set report = crxApplication.OpenReport(strReport, 1)


With report

.ExportOptions.FormatType = crEFTPortableDocFormat
.ExportOptions.PDFExportAllPages = .ExportOptions.PDFExportAllPages
.ExportOptions.PDFFirstPageNumber = .ExportOptions.PDFFirstPageNumber
.ExportOptions.PDFLastPageNumber = .ExportOptions.PDFLastPageNumber
.ExportOptions.DiskFileName = "Z:\CrystalApps\DiversionReport\Test Report.rpt"
'.ExportOptions.MailUserName = "stevem"
.Export False
.DiscardSavedData
End With

Set report = Nothing
Set crxApplication = Nothing

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top