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

DLL Error when using Export to PDF

Status
Not open for further replies.

cjvktv

Programmer
Sep 26, 2001
11
0
0
US
Help!

I'm getting the following error when I try to export using Crystal 8.5 as a batch job running on Windows2000 Server.
"Seagate Crystal Reports ActiveX Designer error -2147190548: Missing or out-of-date export DLL."

Has anyone ever gotten this error? If so what do I need to do to fix.

Thanks
 
This can occur if the value of .ExportOptions.FormatType is set to 0, for example if you use a Select or If statement that is looking for "PDF" or "XLS" and you pass it "pdf" instead, so it falls through without supplying a value and you haven't set a default value elsewhere.

Don't ask why I used that particular example ;)
 
Here's my code:
Private Function GenerateReport(lstrAcctName As String, lstrClientName As String, lstrQuarterSavePath As String, lstrCounselorName As String, lstrFeeStmtIndicator As String, lstrQuarter As String) As Boolean

Const PROC = "GenerateReport"
Dim lstrCrystalReport As String
Dim lRegInfo As AMTS_AQR_DSL.cRuntimeContext
Dim lngErrNum As Long
Dim strErrSrc As String
Dim strErrDsc As String
Dim i As Integer
Dim X As Integer

On Error GoTo ErrorMsg

Set m_objLog = New AQRBatchReporting.cLog

Set mCrystalApplication = CreateObject("CrystalRuntime.Application")

Set lRegInfo = New AMTS_AQR_DSL.cRuntimeContext
lstrCrystalReport = lRegInfo.ReportTemplateSource

'open the report and populate with data
Set mrptCrystalReport = mCrystalApplication.OpenReport(lstrCrystalReport) ', crOpenReportByTempCopy)

If mrptCrystalReport.HasSavedData = True Then
mrptCrystalReport.DiscardSavedData
End If
Set mCrystalDB = mrptCrystalReport.Database
Set mCrystalTables = mCrystalDB.Tables
Set mCrystalTable = mCrystalTables.Item(1)
mCrystalTable.SetDataSource g_rstGetLabelData, 3

'new stuff
Set mrptSections = mrptCrystalReport.Sections
For i = 1 To mrptSections.Count
Set mrptSection = mrptSections.Item(i)
Set mrptReportObjects = mrptSection.ReportObjects
For X = 1 To mrptReportObjects.Count
If mrptReportObjects.Item(X).Kind = crSubreportObject Then

Set mrptSubReport = mrptCrystalReport.OpenSubreport(mrptReportObjects.Item(X).SubreportName)
Set mCrystalDB = mrptSubReport.Database
Set mCrystalTables = mCrystalDB.Tables
Set mCrystalTable = mCrystalTables.Item(1)
Select Case mrptReportObjects.Item(X).SubreportName
Case "OneYearIPH.rpt - 01"
mCrystalTable.SetPrivateData 3, g_rstGetIPHData
Case "PPR.rpt"
mCrystalTable.SetDataSource g_rstGetPPRData, 3
Case "OneYearIPH.rpt - 02"
mCrystalTable.SetPrivateData 3, g_rstGetIPHData
Case "FMI.rpt"
mCrystalTable.SetPrivateData 3, g_rstGetFMIData
Case "PPA"
mCrystalTable.SetPrivateData 3, g_rstGetPPAData
Case "PPAAccount.rpt"
mCrystalTable.SetPrivateData 3, g_rstGetPPAAccountData
Case "Standard"
If lstrFeeStmtIndicator = "F" Then
mCrystalTable.SetPrivateData 3, g_rstGetFEEData
End If
Case "TrustVast"
If lstrFeeStmtIndicator = "F" Then
mCrystalTable.SetPrivateData 3, g_rstGetFEEData
End If
End Select
End If
Next
Next

'here is where we set the export options
Set mCrystalOptions = mrptCrystalReport.ExportOptions
mCrystalOptions.DestinationType = crEDTDiskFile
'mCrystalOptions.FormatType = crEFTCrystalReport
mCrystalOptions.FormatType = crEFTPortableDocFormat
mCrystalOptions.DiskFileName = lstrQuarterSavePath
mrptCrystalReport.DisplayProgressDialog = False
MsgBox "before export"
mrptCrystalReport.Export (False)
MsgBox "after export"
 
Does your code work on your development PC? If so then it sounds like you may not have included all the necessary dll's installed on your server. Are you including the CRXF_PDF.DLL and EXPORTMODELLER.DLL with your installation package?
 
Yes,
I'm also including crstlv.dll.

One thing that may have happened I'm devolping on NT and installing on Windows2000.

Any Thoughts?
 
What about the ATL.DLL; it must also be registered.

If you are installing your app on a 95/98 machine the ATL.DLL must NOT be the unicode version. I found an ANSI version of this dll on Disc 2 of the Developer's Studio
(ver 3.0.8168.0). While I have not deployed my app on an NT4/2000 machine I assume you can use the Unicode version of the dll there without issue. My development pc is 2000 with that version of ATL.DLL.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top