VB Crystal Report >> VB6 Export to MAPI Runtime Error on Export

by peg » Sat, 14 May 2005 04:45:12 GMT

Hello -

I'm having problems with a function to export out a report to a Fax function
on exchange. I think the code works fine if the user has the GFI Faxmaker
client installed, my problem is that even tho I have if Err goto.... in the
function, i'm getting a runtime -2147190908(80047784) Failed to export the
report on the line of code "Report.Export(False)"

I don't understand why it won't let the error handler take control.... after
you click on ok it pops you out of the application.. So in case i have a
user that doesn't have the client installed - i still don't want them to be
booted. Below is my code - any help would be greatly appreciated!!!


Private Sub cmdFAXQuote_Click()

Set crystal = New CRAXDRT.Application 'MANAGES REPORTS
Set report = crystal.OpenReport(App.Path & "\Customerquote.rpt") 'OPEN
OUR REPORT

On Err GoTo ErrorHandler
For Each objTable In report.Database.Tables
objTable.SetLogOnInfo "[SQL LOGIN INFO]"
Next

report.RecordSelectionFormula = "{Quote_Main.QuoteID} = " &
AdoQuote.Recordset.Fields("QuoteID").Value
report.DiscardSavedData 'CLEARS REPORT SO WE WORK FROM RECORDSET
report.ExportOptions.DestinationType = crEDTEMailMAPI
report.ExportOptions.FormatType = crEFTPortableDocFormat
report.ExportOptions.PDFExportAllPages = True
report.ExportOptions.MailToList = "[fax:1" &
adoCustInfo.Recordset.Fields("Fax") & "]"
report.ExportOptions.MailSubject = "Polymer Packaging Quote"
Dim ret As String
report.Export(False)

AdoQuote.Recordset.Fields("datecomplete") = Format(Now(), "mm/dd/yyyy")
AdoQuote.Recordset.Update
GoTo reportend

ErrorHandler:
MsgBox Err.Description & vbCrLf & Err.Number & " Source: " & Err.Source,
vbExclamation, "Error Occured"
Call App.LogEvent(Err.Description & " Number: " & Err.Number & " Source:
" & Err.Source, vbLogEventTypeError)
Err.Clear

reportend:
Set crystal = Nothing
Set report = Nothing

End Sub




Similar Threads

1. Runtime error using c++/MFC exporting Crystal 8.5 report to MAPI as PDF - VB Crystal Report

2. Export Error when using ASP and the CRAXDRT.dll file to export to a .PDF file

I am trying to programatically export Crystal Reports to PDF using ASP.
 I have gotten to the point where when I export the report it prints 1
line before giving this error:

Crystal Reports ActiveX Designer (0x80047784)
Failed to export the report.

If anyone has had a similar issue while trying to export to PDF using
ASP please let me know.  If anyone thinks they may be of help please
just respond and I can provide additional information if needed.  I am
using WebOverlay a 3rd product to actually generate the cyrstal report.
 
Thanks.

Dan

3. Exporting Crystal Report to PDF at runtime in VB6 - Visual Basic

4. Runtime export files Crystal & VB6

Hello -

I tried posting this in the Crystal MSDN group, but noticed that there are 
very few questions in it  and of those, very few were responded to.

My users are not able to get an export dialog box when they click on the 
export button on the toolbar of the crystal reports viewer.  They need to be 
able to export a report to a PDF file.  I am able to get the dialog box from 
my developer machine.  

I have searched the Internet and all I could find out is that it probably is 
due to the lack of a runtime file on the user machines; which exact file was 
not outlined by anyone, including Crystal Report's own site.

I am running Crystal Reports 9 and VB 6.  Does anyone know which file(s) the 
users need?

Any help will be greatly appreciated! 
-- 
Sandy

5. Losing ability to send report as Email (export as MAPI) in Crystal report - VB.Net

6. CR9 MAPI-Export with RDC

I have the following VB6-code:

With
oCrystalReport.ExportOptions
         .FormatType =
crEFTPortableDocFormat
         .PDFExportAllPages = True
        .DestinationType =
crEDTEMailMAPI
        .MailToList = " XXXX@XXXXX.COM "
        .MailSubject = "Test Export"
        .MailMessage = "Test body"
End With
Call oCrystalReport.Export(False)

This code works fine, but:
- when I leave "MailToList" empty, I got an error. CR doesn't ask for
the necessairy fields (No Dialogbox).
- when I change the Export-parameter to "True", the dialogbox appears,
but no values previously assigned are taken in the dialog window.

PS. I have CR9 SP7

Any ideas?

7. VS .NET Export to MAPI - VB Crystal Report

8. CRViewer Export to MAPI

Hi All,
I'm using CR 9 developer with VB 6.0 (SP5). I want to export a crystal
report to email in PDF format. I can do this on from within the VB IDE. I'll
click the export button on the CR viewer and Disk and MAPI are available as
export destinations.

When I install the app on another machine only file is available as an
export destination. I checked the runtime file requirements and I have
u2dmapi.dll included in the package.

Any ideas?

Thanks,
Jonathan
KingsKnight1 <at> hotmail <dot> com