Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Send SQL Report in E mail attachment using C# and ASP.NET

Tags:

I am trying to send report from sql reportserver 2008 as e mail attachment using ASP.NET and C#, Till now I learned how to Get report as PDF in my code , Now I wanna combine line of codes like

byte[] bytes = rview.ServerReport.Render(format, deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
Response.OutputStream.Write(bytes, 0, bytes.Length);
Attachment reportAttachment = new Attachment(Response.OutputStream.Write(bytes,0,bytes.Length),"ado"); //Here I go wrong

Thanx in advance