• .NET

    Custom Toolbar for the Web ReportViewer

    October 23, 2008 Share
    Our insatiable commitment to deliver more than expected in every aspect of our products resulted in me being curious, if we are as flexible as we think and whether one can always achieve his goal be it out of the box or with custom solution using our API and other controls if necessary. Hmmm what could that custom solution be – how about a custom Toolbar for our web ReportViewer. For those of you, who are unfamiliar with our Web ReportViewer , here is a short description – it is designed to render Telerik Reports within ASP.NET projects and it has a toolbar that...
  • .NET

    Send Telerik Report as email attachment

    September 02, 2008 Share
    The Report Viewers (Win and Web) do not support sending of reports via e-mail out-of-the-box. To mail a report you have to first render the report programmatically into a convenient format and then attach it to a mail message. Here is a possible way of how to achieve this by using the SmtpClient object:   void MailReport(Telerik.Reporting.Report report, string from, string to, string subject, string body)       {          string mimeType;          string extension;          Encoding encoding;              byte[] reportBytes =          ReportProcessor.Render("PDF", report, null, out mimeType, out extension, out encoding);                        MemoryStream ms = new MemoryStream(reportBytes);          ms.Position = 0;                         Attachment attachment = new Attachment(ms, report.Name + "." + extension);          MailMessage msg = new MailMessage(from, to, subject, body);          msg.Attachments.Add(attachment);          SmtpClient client = new SmtpClient(smptHost); ...