Example #1
0
        internal ReportPage StartGetPage(int index)
        {
            Load();
            ReportPage page;

            using (FRReader reader = new FRReader(null))
            {
                reader.DeserializeFrom = SerializeTo.Preview;
                reader.ReadChildren    = false;
                reader.BlobStore       = preparedPages.BlobStore;
                page = ReadPage(null, xmlItem, false, reader);
                if (!(page.UnlimitedHeight || page.UnlimitedWidth))
                {
                    page.Dispose();
                    page = ReadPage(null, xmlItem, true, reader);
                    page.SetReport(preparedPages.Report);
                    posprocessor = new PreparedPagePosprocessor();
                    posprocessor.Postprocess(page);
                    posprocessor = null;
                }
                else
                {
                    page.SetReport(preparedPages.Report);
                    posprocessor = new PreparedPagePosprocessor();
                    posprocessor.PostprocessUnlimited(this, page);
                }
            }
            if (page.MirrorMargins && (index + 1) % 2 == 0)
            {
                float f = page.LeftMargin;
                page.LeftMargin  = page.RightMargin;
                page.RightMargin = f;
            }
            return(page);
        }
Example #2
0
 internal void EndGetPage(ReportPage page)
 {
     if (posprocessor != null)
     {
         posprocessor = null;
     }
     if (page != null)
     {
         page.Dispose();
     }
     ClearUploadedXml();
 }