Posted 6 October 2017, 3:35 am EST
OK, I am not having a problem getting it to eMail a document. See my PageReport1.zip attached before.
Page 4 is the report printed from the viewer1. After this my code is as follows:
Dim pd As New PageDocument(pr)
pr.Run()
Viewer1.LoadDocument(pd)
’ Exit Sub
Dim Smtpmail As New System.Net.Mail.SmtpClient
Smtpmail.Host = "EmailServer"
Dim _mail As New System.Net.Mail.MailMessage
Dim myClient As New WebClient()
Console.WriteLine("Setting up eMail Message")
Dim emre As New GrapeCity.ActiveReports.Export.Html.Page.EmailRenderingExtension
pd.Render(emre, Nothing)
_mail = emre.MailMessage
_mail.IsBodyHtml = True
_mail.BodyEncoding = System.Text.Encoding.UTF8
_mail.From = New System.Net.Mail.MailAddress("DownloadStatus@Firstbankms.com")
' _mail.To.Add("richardd@firstbankms.com")
_mail.To.Add("jim@firstbankms.com")
' _mail.To.Add("brendam@firstbankms.com")
_mail.Subject = "DownLoad Status Test"
' _mail.Body = mystring
' set the default smtp server & send it
Smtpmail.Send(_mail)
The email result is pages 1 and 2. Only a partial amount of the data is shown in the email so it must be related to the Render statement.
Dim emre As New GrapeCity.ActiveReports.Export.Html.Page.EmailRenderingExtension
pd.Render(emre, Nothing)
_mail = emre.MailMessage
So it works in the viewer: In the Preview of the viewer but not in the email message.
How can I debug this?