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();
    }
Exemple #2
0
        private void xrRichText1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            IDocumentBody body = this.GetCurrentColumnValue("Body") as IDocumentBody;


            if (body != null)
            {
                if (body.Document != null)
                {
                    using (MemoryStream m = new MemoryStream(body.Document))
                    {
                        XRRichText t = sender as XRRichText;
                        t.LoadFile(m, XRRichTextStreamType.RtfText);

                        //t.Rtf = Encoding.UTF8.GetString(body.Document);
                    }
                }
            }
        }