Notifications
Announcements
No record found.
HI,
I would like to send my custom report as Email body (not the attachment of email)
Please help me ,
Thanks in Advance
Thanks
*This post is locked for comments
Ideally you would use a plugin or custom workflow to generate the email and produce the content inside the email body especially if you need to include data from child records in a relationship.
Hi Shekar,
You can do it with custom coding..
You can render SSRS report into different formats like PDF, MHTML, CSV, Word etc.
To use it into Email body you need to render report into MHTML format.
When you render to MHTML format, it is give you Byte array, you can get report output in HTML from byte array by using
byte[] reportDetails = Report rendered output; System.Text.UTF8Encoding reportInHtml = new UTF8Encoding(); string ReportRenderedMHTML = reportInHtml.GetString(reportDetails);
Then just assign this ReportRenderedMHTML to Email description.
Email email=new Email(); email.Description= ReportRenderedMHTML ;
Here are more details on HTML rendering
msdn.microsoft.com/.../dd255269.aspx;MSPPError=-2147217396
stackoverflow.com/.../render-ssrs-2008-report-in-web-page-without-report-viewer
Sometime when you add this report MHTML to email body.. In outlook format is not showing properly.. in web browser its shows correct..
In this case you might use MHTML to HTML parse and add HTML output to email body.
prndl.us/mhtml-html-decoding-c-sharp
github.com/.../MHTML-to-HTML-Decoding-in-C-Sharp
Hope this will help..
Any ideas if the report has charts (that render as images) and the email needs to be open in Outlook.
How can we create MIME attachments to a CRM Email that can be referenced from the email body with a cid???
Outlook definitively does not support embedded images in email messages. So, images need to be added as attachments.
How can we create MIME attachments to a CRM Email that can be referenced from the email body with a cid?
I didn't see in the activitymimeattachment entity an option to create or associate a cid.
Thank You Mahadeo Matre,
The solution works perfectly for me, you are life saver for me, i was looking for the solution for days and going no where.
Thanks Again Mate
Hi Mahadeo,
Can you please help to convert MHTML to HTML from JavaScript.
I have requirement in which i have to place ssrs report content in mail body.
Regards,
kamran
Hi,
I am trying the same approach with the word document template. Retrieved the word annotation and converting its documentbody contents to bytes and then to string as shown below.
byte[] file = Convert.FromBase64String(_NotesAttachment.Attributes["documentbody"].ToString());
System.Text.UTF8Encoding reportInHtml = new UTF8Encoding();
string content = reportInHtml.GetString(file);
but , I am facing this error "The field 'description' contains one or more invalid characters".
Anyone faced this error?
Thanks,
Mridula
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2