private void SynchronizeReport() { XtraReport1 report = new XtraReport1(); XRRichText richText = report.FindControl("richText", true) as XRRichText; MemoryStream ms = new MemoryStream(); byte[] stringByteArray = ToByteArray(string.Format(HTMLDocumentTemplate, this.ASPxHtmlEditor1.Html)); ms.Write(stringByteArray, 0, stringByteArray.Length); ms.Position = 0; richText.LoadFile(ms, XRRichTextStreamType.HtmlText); ms.Close(); this.ReportViewer1.Report = report; this.ReportViewer1.DataBind(); }