The following code loads the report, export it to PDF format, and send it
through mail.
try this............
Dim myExportOpts as ExportOptions
Dim myMailOpts as new MicrosoftMailDestinationOptions
Dim crReportDocument As New ReportDocument()
crReportDocument.Load(ReportFileName)
'Get reference to Export options object from the current report
myExportOpts = crReportDocument.ExportOptions
myExportOpts.ExportFormatType = ExportFormatType.PortableDocFormat
myExportOpts.ExportDestinationType = ExportDestinationType.MicrosoftMail
'Set Mail options
myMailOpts.MailMessage = "Assign the Message Value here"
myMailOpts.MailToList =
yo******@yourServer.com
myMailOpts.MailSubject = "Mail Subject"
'Send reference of Mail Options object to ExportOptions
exportOpts.DestinationOptions = myMailOpts
'Export the Report
crReportDocument.Export()
Good Luck!
"touf" <to******@hotmail.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
hi,
1- I've a report (Crystal reports) created from a vb Form
(crystalReportsViewer)
How can I send it via email , In crystal report there is the possibility
to export, but I didn't find a way to send it by email.
2- I've also post a quetion for few days but didn't receive answer: How
can I display a text (invoice number) at th top of all pages of my report,
I've a report header and page header (that contain other informations) , the
problem is that in th first page the report header is on top and the page
header under it.
Thanks for your help.