Hello,

i m using vb.net with MS Access database & oledbconnection in my project.

now i want to mail my crystal report in pdf format to respected email-id,
how can i do this?????

i spent lot of time for searching some helpful bt didn't get

Recommended Answers

All 6 Replies

Hi,

To export a Crystal Report to PDF.
You can find some information, here.

To send an Email, try this:

Dim mail As New MailMessage()
mail.To = "me@mycompany.com"
mail.From = "you@yourcompany.com"
mail.Subject = "this is a test email."
mail.Body = "this is my test email body."
Dim attachment As New MailAttachment(Server.MapPath("test.pdf")) 'create the attachment
mail.Attachments.Add(attachment) 'add the attachment
SmtpMail.SmtpServer = "localhost" 'your real server goes here
SmtpMail.Send(mail)

Hi,

To export a Crystal report to PDF, look here.

thank you sir,
one more question
is it possible to directly send the generated pdf file to specific email id?????

if possible this will be large milestone for me....

Thnx in advance

Hi,

I think yoou can only send the generated file as attachment, but you can always write code that you can't change the specific Email ID.
See previous post how to send an Email.

Thank U Sir.

Hi,

No problem :)
Mark this thread as resolved and rating is a way of saying thank you. Don't forget to rate always, thanks. :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.