Email a pdf file
Can anyone help me to write some coding to send a pdf file via email using FastReports email functionality.
I can do it manually and all goes fine, I can send a saved file using VB (which would work) but is not the point of FastReports.
I need to do it in VB (I am using Visual Studio 2008). Here is my starting effort but where from here as can't sem to finda way of adding SMTP server details or attachments
Any help much appreciated
Gus
I can do it manually and all goes fine, I can send a saved file using VB (which would work) but is not the point of FastReports.
I need to do it in VB (I am using Visual Studio 2008). Here is my starting effort but where from here as can't sem to finda way of adding SMTP server details or attachments
Dim ListReport = New FastReport.Report
ListReport.Load(My.Settings.ReportLocation & "ReportInvoiceNoDiscount.frx")
ListReport.SetParameterValue("NMDbConnectionString", "Data Source=" & My.Settings.Server & "\SQLEXPRESS;AttachDbFilename=;Initial Catalog=NMDb;Integrated Security=True;Persist Security Info=False;User ID=;Password=")
ListReport.SetParameterValue("ShopperID", lblShopperIDV.Text)
ListReport.EmailSettings.Subject = "Test"
Any help much appreciated
Gus
Comments
Here is C# equivalent that exports the report to pdf and sends it via SMTP:
Cheers
Gus
I have enclosed my VB Code below for anyone that is interested. It is used to send an email to a customer with Invoice attached
Now one last question:
Is there a way to either amend the name of the pdf file being attached or is it possible to actually attach the exported file
Cheers
Gus
i tried this VB code and it working... but i have an issue... a small problem...
I use am image as background as watermark... and the image is not being exported to pdf and to email...
Can anyone help me ?!?!
here is my code :