Beispiel #1
0
        public override Stream Render(IDataSource dataSource)
        {
            // If we have not written anything _yet_ to the Stream, we will
            // be writing a complete page with this call.
            if (Writer.BaseStream.Position == 0)
            {
                return(RenderPage(dataSource));
            }

            XhtmlTextWriter xhtmlWriter = new XhtmlTextWriter(Writer);

            xhtmlWriter.Indent = 3;

            // Flush writer contents to output.
            xhtmlWriter.Flush();

            // Emit Core of Page
            HTMLReportView <RenderType> view = new HTMLReportView <RenderType>(Writer);

            view.Text = Text;
            view.Render(dataSource);

            // Flush writer contents to output.
            xhtmlWriter.Flush();

            return(Writer.BaseStream);
        }
Beispiel #2
0
        public Stream RenderPage(IDataSource dataSource)
        {
            RenderPageBegin();

            XhtmlTextWriter xhtmlWriter = new XhtmlTextWriter(Writer);

            xhtmlWriter.Indent = 3;

            // Flush writer contents to output.
            xhtmlWriter.Flush();

            // Emit Core of Page
            HTMLReportView <RenderType> view = new HTMLReportView <RenderType>(Writer);

            view.Text = Text;
            view.Render(dataSource);

            RenderPageEnd();

            // Flush writer contents to output.
            xhtmlWriter.Flush();

            return(Writer.BaseStream);
        }