Currently I have an asp.net website that generates a PDF document of a letter so I can send it to a client. The same website can also email the client if we have a valid email address. My problem is every time I need to update the letter I have to go and update the same thing in the email. Is there an easier way to do this? Currently what we use to generate the PDF documents is a RDLC and for the email it is just hard coded in the project. What I'm wanting is a way that I can export a PDF document and also be able to export the same thing as html code that I can send in the body of an email. I don't want to use 3rd party software or add anything to my project. If anyone has any ideas let me know.
Asked
Active
Viewed 38 times
0
-
Are you accessing the reports via url and query string parameters? – Ross Bush Jul 15 '15 at 22:01
-
I generate them like this. bytes = rv.LocalReport.Render("PDF", Nothing, mimeType, encoding, extension, streamids, warn) ' – aherigon Jul 15 '15 at 22:11
-
I bet you can specify HTML40 as the format in the Render() method and save that byte[] result to a filestream, after which, you can create an smtp email using .net and set the temp file create earlier as an attachment. You just have to configure IIS with smtp. – Ross Bush Jul 15 '15 at 22:26
-
I have tried that but HTML4.0 is not a format of localreport.render so when I try it it gives me an error. I think it use to be supported in older versions of report viewer but I am on version 11 because we use visual Studio 2013 – aherigon Jul 15 '15 at 22:29
1 Answers
0
I'll answer with a link to an extraodinarilay simmilar question that has a very good answer Rendering an RDLC report in HTML in ASP.NET MVC
-
Thanks! I'll try it out tomorrow! I really hope this works. I've been trying to do this for weeks – aherigon Jul 16 '15 at 03:22