By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,998 Members | 2,773 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,998 IT Pros & Developers. It's quick & easy.

Problem sending Crystal report (HTML format) via MAPI

P: n/a
Please forgive me for cross posting. I hope I can get the answer from either
NG.
I was able to export a CR report to PDF to MAPI (using Outlook client) , but
not with HTML format from a .NET application.
In Brian Bischof's book, he warns about the file folder that created by CR
during export to HTML format. I don't know whether this is the case but all
parameters were set to false, meaning it's a simple export to HTML format.

Please take a look at the code below and tell me what I did wrong.

Thanks a million.

Bill
----------
Dim OlType As Type

Dim OutlookApp As Object

Try

myReport.RecordSelectionFormula = mSelection

' myReport.ExportOptions.ExportFormatType =
ExportFormatType.PortableDocFormat

myReport.ExportOptions.ExportFormatType = ExportFormatType.HTML32

Dim formatOptions As CrystalDecisions.Shared.HTMLFormatOptions = _

New CrystalDecisions.Shared.HTMLFormatOptions

formatOptions.HTMLHasPageNavigator = False

formatOptions.HTMLEnableSeparatedPages = False

formatOptions.UsePageRange = False

formatOptions.HTMLFileName = "MyName.HTM"

formatOptions.HTMLBaseFolderName = "C:\vs2005\tempdoc"

myReport.ExportOptions.ExportFormatOptions = formatOptions

myReport.ExportOptions.ExportDestinationType =
ExportDestinationType.MicrosoftMail

'myreport.

Dim mailOptions As CrystalDecisions.Shared.MicrosoftMailDestinationOp tions =
_

New CrystalDecisions.Shared.MicrosoftMailDestinationOp tions

mailOptions.MailSubject = "My HTML Report- via Email"

mailOptions.MailToList = "my****@jaco.com"

mailOptions.MailMessage = "This is the message"

myReport.ExportOptions.ExportDestinationOptions = mailOptions

myReport.Export()

Catch ex As Exception

MsgBox(ex.ToString)

End Try
May 23 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.