public void UpdateReportSectionSizes(RPLWriter rplWriter)
 {
     if (this.m_itemRenderSizes != null && rplWriter != null)
     {
         double num = this.m_itemRenderSizes.Width;
         if (this.m_header != null)
         {
             num = Math.Max(num, this.m_header.ItemRenderSizes.Width);
             this.m_itemRenderSizes.Height += this.m_header.ItemRenderSizes.Height;
         }
         if (this.m_footer != null)
         {
             num = Math.Max(num, this.m_footer.ItemRenderSizes.Width);
             this.m_itemRenderSizes.Height += this.m_footer.ItemRenderSizes.Height;
         }
         this.m_itemRenderSizes.Width = num;
         this.NormalizeSectionAreasWidths(rplWriter, num);
     }
 }
示例#2
0
 public void WriteStartItemToStream(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             base.m_offset = baseStream.Position;
             binaryWriter.Write((byte)10);
             this.WriteElementProps(binaryWriter, rplWriter, pageContext, base.m_offset + 1);
         }
         else
         {
             base.m_rplElement = new RPLRectangle();
             this.WriteElementProps(base.m_rplElement.ElementProps, rplWriter, pageContext);
         }
     }
 }
示例#3
0
 private void WriteReportPageLayoutAtStart(RPLWriter rplWriter)
 {
     if (this.m_pageContext.VersionPicker != 0 && this.m_pageContext.VersionPicker != RPLVersionEnum.RPL2008WithImageConsolidation && rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         Page         page         = ((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>) this.m_report.ReportSections)[0].Page;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             this.m_pageLayoutOffset = baseStream.Position;
             binaryWriter.Write((byte)3);
             binaryWriter.Write((byte)16);
             binaryWriter.Write((float)page.PageHeight.ToMillimeters());
             binaryWriter.Write((byte)17);
             binaryWriter.Write((float)page.PageWidth.ToMillimeters());
             binaryWriter.Write((byte)20);
             binaryWriter.Write((float)page.BottomMargin.ToMillimeters());
             binaryWriter.Write((byte)19);
             binaryWriter.Write((float)page.LeftMargin.ToMillimeters());
             binaryWriter.Write((byte)21);
             binaryWriter.Write((float)page.RightMargin.ToMillimeters());
             binaryWriter.Write((byte)18);
             binaryWriter.Write((float)page.TopMargin.ToMillimeters());
             ReportPageLayout reportPageLayout = new ReportPageLayout(page);
             reportPageLayout.WriteElementStyle(rplWriter, this.m_pageContext);
             binaryWriter.Write((byte)255);
         }
         else
         {
             RPLPageLayout rPLPageLayout = new RPLPageLayout();
             rplWriter.Report.RPLPaginatedPages[0].PageLayout = rPLPageLayout;
             rPLPageLayout.PageHeight   = (float)page.PageHeight.ToMillimeters();
             rPLPageLayout.PageWidth    = (float)page.PageWidth.ToMillimeters();
             rPLPageLayout.MarginBottom = (float)page.BottomMargin.ToMillimeters();
             rPLPageLayout.MarginLeft   = (float)page.LeftMargin.ToMillimeters();
             rPLPageLayout.MarginRight  = (float)page.RightMargin.ToMillimeters();
             rPLPageLayout.MarginTop    = (float)page.TopMargin.ToMillimeters();
             ReportPageLayout reportPageLayout2 = new ReportPageLayout(page);
             reportPageLayout2.WriteElementStyle(rplWriter, this.m_pageContext);
         }
     }
 }
示例#4
0
 public override bool CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, double parentTopInPage, ref double parentPageHeight, Interactivity interactivity)
 {
     base.AdjustOriginFromItemsAbove(siblings, repeatWithItems);
     if (!this.HitsCurrentPage(pageContext, parentTopInPage))
     {
         return(false);
     }
     base.m_itemPageSizes.AdjustHeightTo(0.0);
     base.m_itemPageSizes.AdjustWidthTo(0.0);
     base.m_itemState = State.OnPage;
     if (interactivity != null)
     {
         interactivity.RegisterItem(this, pageContext);
     }
     if (rplWriter != null && base.m_itemRenderSizes == null)
     {
         this.CreateItemRenderSizes(null, pageContext, false);
     }
     return(true);
 }
示例#5
0
        public override void WriteCustomSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.Image image = (AspNetCore.ReportingServices.OnDemandReportRendering.Image)base.m_source;
            switch (image.Sizing)
            {
            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.Clip:
                spbifWriter.Write((byte)41);
                spbifWriter.Write((byte)3);
                break;

            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.Fit:
                spbifWriter.Write((byte)41);
                spbifWriter.Write((byte)1);
                break;

            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.FitProportional:
                spbifWriter.Write((byte)41);
                spbifWriter.Write((byte)2);
                break;
            }
        }
        public void WriteItemToStream(RPLWriter rplWriter, PageContext pageContext)
        {
            BinaryWriter binaryWriter = rplWriter.BinaryWriter;

            if (binaryWriter != null)
            {
                Stream baseStream = binaryWriter.BaseStream;
                long   position   = baseStream.Position;
                binaryWriter.Write(this.GetElementToken(pageContext));
                this.WriteElementProps(binaryWriter, rplWriter, pageContext, position + 1);
                base.m_offset = baseStream.Position;
                binaryWriter.Write((byte)254);
                binaryWriter.Write(position);
                binaryWriter.Write((byte)255);
            }
            else
            {
                base.m_rplElement = this.CreateRPLItem();
                this.WriteElementProps(base.m_rplElement.ElementProps, rplWriter, pageContext);
            }
        }
 public void UpdateItem(PageItemHelper itemHelper, RPLWriter rplWriter, PageContext pageContext)
 {
     if (itemHelper != null)
     {
         PageItemRepeatWithHelper pageItemRepeatWithHelper = itemHelper as PageItemRepeatWithHelper;
         RSTrace.RenderingTracer.Assert(pageItemRepeatWithHelper != null, "This should be a RepeatWith");
         this.m_relativeTop         = pageItemRepeatWithHelper.RelativeTop;
         this.m_relativeBottom      = pageItemRepeatWithHelper.RelativeBottom;
         this.m_relativeTopToBottom = pageItemRepeatWithHelper.RelativeTopToBottom;
         this.m_dataRegionIndex     = pageItemRepeatWithHelper.DataRegionIndex;
         if (pageItemRepeatWithHelper.RenderItemSize != null)
         {
             this.m_renderItemSize = pageItemRepeatWithHelper.RenderItemSize.GetNewItem();
         }
         if (this.m_pageItem != null)
         {
             PageContext pageContext2 = new PageContext(pageContext, PageContext.PageContextFlags.FullOnPage, PageContext.IgnorePBReasonFlag.Repeated);
             this.m_pageItem.CalculateRepeatWithPage(rplWriter, pageContext2, null);
         }
     }
 }
        private void WriteEndSectionItemToRPLOM(RPLWriter rplWriter)
        {
            RPLItemMeasurement rPLItemMeasurement = this.m_body.WritePageItemRenderSizes();

            this.m_body.ItemRenderSizes             = null;
            this.m_rplReportSection.BodyArea        = new RPLMeasurement();
            this.m_rplReportSection.BodyArea.Height = rPLItemMeasurement.Height;
            this.m_rplReportSection.BodyArea.Width  = rPLItemMeasurement.Width;
            this.m_rplReportSection.BodyArea.Top    = rPLItemMeasurement.Top;
            this.m_rplReportSection.BodyArea.Left   = rPLItemMeasurement.Left;
            if (this.m_header != null)
            {
                this.m_rplReportSection.Header = this.m_header.WritePageItemRenderSizes();
                this.m_header.ItemRenderSizes  = null;
            }
            if (this.m_footer != null)
            {
                this.m_rplReportSection.Footer = this.m_footer.WritePageItemRenderSizes();
                this.m_footer.ItemRenderSizes  = null;
            }
        }
        public void CalculateItem(RPLWriter rplWriter, PageContext pageContext, bool isHeader, Interactivity interactivity, bool native)
        {
            this.WriteStartItemToStream(rplWriter, isHeader, pageContext, native);
            base.CreateChildren(this.m_source.ReportItemCollection, pageContext, base.m_itemPageSizes.Width, base.m_itemPageSizes.Height);
            double num = 0.0;

            if (base.m_children != null)
            {
                double   num2     = 0.0;
                PageItem pageItem = null;
                for (int i = 0; i < base.m_children.Length; i++)
                {
                    pageItem = base.m_children[i];
                    if (pageItem != null)
                    {
                        pageItem.CalculatePage(rplWriter, null, pageContext, base.m_children, null, 0.0, ref num, interactivity);
                        num2 = Math.Max(num2, pageItem.ItemPageSizes.Bottom + base.m_itemPageSizes.PaddingBottom);
                    }
                }
                base.ConsumeWhitespaceVertical(base.m_itemPageSizes, num2, pageContext);
            }
            if (pageContext.CancelPage)
            {
                base.m_itemState  = State.Below;
                base.m_children   = null;
                base.m_rplElement = null;
            }
            else
            {
                if (rplWriter != null)
                {
                    this.CreateItemRenderSizes(null, pageContext, false);
                    PageItem[] childrenOnPage = null;
                    int        itemsOnPage    = base.CalculateRenderSizes(rplWriter, pageContext, interactivity, (List <int>)null, out childrenOnPage);
                    this.WriteEndItemToStream(rplWriter, itemsOnPage, childrenOnPage);
                }
                base.m_indexesLeftToRight = null;
                base.m_children           = null;
            }
        }
        public override bool CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, double parentTopInPage, ref double parentPageHeight, Interactivity interactivity)
        {
            base.AdjustOriginFromItemsAbove(siblings, repeatWithItems);
            if (!this.HitsCurrentPage(pageContext, parentTopInPage))
            {
                return(false);
            }
            ItemSizes contentSize = null;
            bool      flag        = base.ResolveItemHiddenState(rplWriter, interactivity, pageContext, false, ref contentSize);

            parentPageHeight = Math.Max(parentPageHeight, base.m_itemPageSizes.Bottom);
            if (!pageContext.IgnorePageBreaks)
            {
                if (base.PageBreakAtEnd)
                {
                    base.m_itemState = State.OnPagePBEnd;
                    pageContext.RegisterPageBreak(new PageBreakInfo(this.PageBreak, base.ItemName));
                }
                if (!flag)
                {
                    pageContext.RegisterPageName(this.PageName);
                }
            }
            if (pageContext.TracingEnabled && pageContext.IgnorePageBreaks)
            {
                base.TracePageBreakAtEndIgnored(pageContext);
            }
            if (rplWriter != null)
            {
                if (base.m_itemRenderSizes == null)
                {
                    this.CreateItemRenderSizes(contentSize, pageContext, false);
                }
                if (!flag)
                {
                    this.WriteItemToStream(rplWriter, pageContext);
                }
            }
            return(true);
        }
示例#11
0
 public void WriteEndItemToStream(RPLWriter rplWriter, int sectionStartIndex, int itemsOnPage, PageHeadFoot header, PageHeadFoot footer, double bodyWidth, double bodyHeight, string pageName)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             if (this.m_pageContext.VersionPicker == RPLVersionEnum.RPL2008 || this.m_pageContext.VersionPicker == RPLVersionEnum.RPL2008WithImageConsolidation)
             {
                 this.WriteEndItemToRPLStream2008(binaryWriter, itemsOnPage, header, footer, bodyWidth, bodyHeight);
             }
             else
             {
                 this.WriteEndItemToRPLStream(binaryWriter, pageName);
             }
         }
         else
         {
             this.WriteEndItemToRPLOM(rplWriter, sectionStartIndex, pageName);
         }
     }
 }
示例#12
0
        public override int WriteRepeatWithToPage(RPLWriter rplWriter, PageContext pageContext)
        {
            if (base.ItemState == State.OnPageHidden)
            {
                return(0);
            }
            this.WriteStartItemToStream(rplWriter, pageContext);
            int num = 0;

            if (base.m_children != null)
            {
                for (int i = 0; i < base.m_children.Length; i++)
                {
                    if (base.m_children[i] != null)
                    {
                        num += base.m_children[i].WriteRepeatWithToPage(rplWriter, pageContext);
                    }
                }
            }
            base.WriteRepeatWithEndItemToStream(rplWriter, num);
            return(1);
        }
示例#13
0
 public void WriteEndItemToStream(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             if (pageContext.VersionPicker == RPLVersionEnum.RPL2008 || pageContext.VersionPicker == RPLVersionEnum.RPL2008WithImageConsolidation)
             {
                 this.WriteEndItemToRPLStream2008(binaryWriter);
             }
             else
             {
                 this.WriteEndItemToRPLStream(binaryWriter);
             }
         }
         else
         {
             this.WriteEndItemToRPLOM(rplWriter);
         }
     }
 }
示例#14
0
 public override void WriteCustomNonSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext)
 {
     AspNetCore.ReportingServices.OnDemandReportRendering.Report report = ((AspNetCore.ReportingServices.OnDemandReportRendering.SubReport)base.m_source).Report;
     if (report != null && report.Language != null)
     {
         string text = null;
         if (report.Language.IsExpression)
         {
             ReportInstance instance = report.Instance;
             text = instance.Language;
         }
         else
         {
             text = report.Language.Value;
         }
         if (text != null)
         {
             spbifWriter.Write((byte)11);
             spbifWriter.Write(text);
         }
     }
 }
 public void WriteStartItemToStream(RPLWriter rplWriter)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             if (this.m_pageContext.VersionPicker == RPLVersionEnum.RPL2008 || this.m_pageContext.VersionPicker == RPLVersionEnum.RPL2008WithImageConsolidation)
             {
                 this.WriteStartRectangleItemToRPLStream2008(binaryWriter);
             }
             else
             {
                 this.WriteStartSectionItemToRPLStream(binaryWriter);
             }
         }
         else
         {
             this.WriteStartSectionItemToRPLOM(rplWriter);
         }
     }
 }
 public void WriteElementStyle(RPLWriter rplWriter, PageContext pageContext)
 {
     if (rplWriter != null)
     {
         Style style = base.m_source.Style;
         if (style != null)
         {
             BinaryWriter binaryWriter = rplWriter.BinaryWriter;
             if (binaryWriter != null)
             {
                 this.WriteSharedStyle(binaryWriter, style, pageContext, 6);
                 StyleInstance styleInstance = base.GetStyleInstance(base.m_source, null);
                 if (styleInstance != null)
                 {
                     this.WriteNonSharedStyle(binaryWriter, style, styleInstance, pageContext, null, null);
                 }
                 binaryWriter.Write((byte)255);
             }
             else
             {
                 RPLPageLayout pageLayout     = rplWriter.Report.RPLPaginatedPages[0].PageLayout;
                 RPLStyleProps rPLStyleProps  = this.WriteSharedStyle(style, pageContext);
                 RPLStyleProps rPLStyleProps2 = null;
                 StyleInstance styleInstance2 = base.GetStyleInstance(base.m_source, null);
                 if (styleInstance2 != null)
                 {
                     rPLStyleProps2 = this.WriteNonSharedStyle(style, styleInstance2, pageContext, null);
                 }
                 if (rPLStyleProps == null && rPLStyleProps2 == null)
                 {
                     return;
                 }
                 pageLayout.Style = new RPLElementStyle(rPLStyleProps2, rPLStyleProps);
             }
         }
     }
 }
示例#17
0
        public override bool CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, double parentTopInPage, ref double parentPageHeight, Interactivity interactivity)
        {
            base.AdjustOriginFromItemsAbove(siblings, repeatWithItems);
            if (!this.HitsCurrentPage(pageContext, parentTopInPage))
            {
                return(false);
            }
            ItemSizes contentSize = null;
            bool      flag        = base.ResolveItemHiddenState(rplWriter, interactivity, pageContext, false, ref contentSize);

            parentPageHeight = Math.Max(parentPageHeight, base.m_itemPageSizes.Bottom);
            if (rplWriter != null)
            {
                if (base.m_itemRenderSizes == null)
                {
                    this.CreateItemRenderSizes(contentSize, pageContext, false);
                }
                if (!flag)
                {
                    this.WriteItemToStream(rplWriter, pageContext);
                }
            }
            return(true);
        }
 public void WriteBodyColumnsToStream(RPLWriter rplWriter)
 {
     if (this.m_pageContext.VersionPicker != 0 && this.m_pageContext.VersionPicker != RPLVersionEnum.RPL2008WithImageConsolidation && rplWriter != null)
     {
         BinaryWriter binaryWriter = rplWriter.BinaryWriter;
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             long   position   = baseStream.Position;
             binaryWriter.Write((byte)16);
             binaryWriter.Write(this.m_bodyOffset);
             binaryWriter.Write(1);
             this.m_body.WritePageItemRenderSizes(binaryWriter);
             this.m_bodyOffset = baseStream.Position;
             binaryWriter.Write((byte)254);
             binaryWriter.Write(position);
             binaryWriter.Write((byte)255);
         }
         else
         {
             this.m_rplReportSection.Columns[0] = this.m_body.WritePageItemRenderSizes();
         }
     }
 }
示例#19
0
 public void WriteStartItemToStream(RPLWriter rplWriter)
 {
     if (rplWriter != null)
     {
         BinaryWriter         binaryWriter = rplWriter.BinaryWriter;
         string               language     = null;
         ReportStringProperty language2    = this.m_report.Language;
         if (language2 != null)
         {
             if (language2.IsExpression)
             {
                 ReportInstance instance = this.m_report.Instance;
                 language = instance.Language;
             }
             else
             {
                 language = language2.Value;
             }
         }
         if (binaryWriter != null)
         {
             if (this.m_pageContext.VersionPicker == RPLVersionEnum.RPL2008 || this.m_pageContext.VersionPicker == RPLVersionEnum.RPL2008WithImageConsolidation)
             {
                 this.WriteStartItemToRPLStream2008(binaryWriter, language);
             }
             else
             {
                 this.WriteStartItemToRPLStream(binaryWriter, language);
             }
         }
         else
         {
             this.WriteStartItemToRPLOM(rplWriter, language);
         }
     }
 }
        public override void WriteCustomNonSharedItemProps(RPLElementProps nonSharedProps, RPLWriter rplWriter, PageContext pageContext)
        {
            ActionInfoWithDynamicImageMapCollection actionInfoWithDynamicImageMapCollection = null;
            RPLDynamicImageProps rPLDynamicImageProps = (RPLDynamicImageProps)nonSharedProps;
            string streamName = null;

            System.Drawing.Rectangle empty = System.Drawing.Rectangle.Empty;
            rPLDynamicImageProps.DynamicImageContent       = this.LoadDynamicImage(pageContext, ref streamName, out actionInfoWithDynamicImageMapCollection, out empty);
            rPLDynamicImageProps.ImageConsolidationOffsets = empty;
            rPLDynamicImageProps.StreamName = streamName;
            if (actionInfoWithDynamicImageMapCollection != null)
            {
                rPLDynamicImageProps.ActionImageMapAreas = base.WriteImageMapAreaInstanceCollection(actionInfoWithDynamicImageMapCollection, pageContext);
            }
        }
示例#21
0
        public override void WriteNonSharedItemProps(RPLElementProps elemProps, RPLWriter rplWriter, PageContext pageContext)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.Paragraph paragraph = base.m_source as AspNetCore.ReportingServices.OnDemandReportRendering.Paragraph;
            RSTrace.RenderingTracer.Assert(paragraph != null, "The paragraph definition cannot be null");
            ParagraphInstance paragraphInstance = null;
            bool flag = false;

            if (this.m_compiledSource != null)
            {
                paragraphInstance = this.m_compiledSource;
                flag = true;
            }
            else
            {
                paragraphInstance = paragraph.Instance;
                RSTrace.RenderingTracer.Assert(paragraphInstance != null, "The paragraph instance cannot be null");
            }
            elemProps.UniqueName = paragraphInstance.UniqueName;
            RPLParagraphProps rPLParagraphProps = elemProps as RPLParagraphProps;

            if (!flag)
            {
                if (this.IsExpressionValue(paragraph.LeftIndent, paragraphInstance.LeftIndent))
                {
                    rPLParagraphProps.LeftIndent = new RPLReportSize(paragraphInstance.LeftIndent.ToString());
                }
                if (this.IsExpressionValue(paragraph.RightIndent, paragraphInstance.RightIndent))
                {
                    rPLParagraphProps.RightIndent = new RPLReportSize(paragraphInstance.RightIndent.ToString());
                }
                if (this.IsExpressionValue(paragraph.HangingIndent, paragraphInstance.HangingIndent))
                {
                    rPLParagraphProps.HangingIndent = new RPLReportSize(paragraphInstance.HangingIndent.ToString());
                }
                if (paragraph.ListStyle.IsExpression)
                {
                    rPLParagraphProps.ListStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(paragraphInstance.ListStyle);
                }
                else
                {
                    rPLParagraphProps.ListStyle = null;
                }
                if (paragraph.ListLevel.IsExpression)
                {
                    rPLParagraphProps.ListLevel = paragraphInstance.ListLevel;
                }
                else
                {
                    rPLParagraphProps.ListLevel = null;
                }
                if (this.IsExpressionValue(paragraph.SpaceBefore, paragraphInstance.SpaceBefore))
                {
                    rPLParagraphProps.SpaceBefore = new RPLReportSize(paragraphInstance.SpaceBefore.ToString());
                }
                if (this.IsExpressionValue(paragraph.SpaceAfter, paragraphInstance.SpaceAfter))
                {
                    rPLParagraphProps.SpaceAfter = new RPLReportSize(paragraphInstance.SpaceAfter.ToString());
                }
            }
            else
            {
                if (paragraphInstance.LeftIndent != null)
                {
                    rPLParagraphProps.LeftIndent = new RPLReportSize(paragraphInstance.LeftIndent.ToString());
                }
                if (paragraphInstance.RightIndent != null)
                {
                    rPLParagraphProps.RightIndent = new RPLReportSize(paragraphInstance.RightIndent.ToString());
                }
                if (paragraphInstance.HangingIndent != null)
                {
                    rPLParagraphProps.HangingIndent = new RPLReportSize(paragraphInstance.HangingIndent.ToString());
                }
                rPLParagraphProps.ListStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(paragraphInstance.ListStyle);
                rPLParagraphProps.ListLevel = paragraphInstance.ListLevel;
                if (paragraphInstance.SpaceBefore != null)
                {
                    rPLParagraphProps.SpaceBefore = new RPLReportSize(paragraphInstance.SpaceBefore.ToString());
                }
                if (paragraphInstance.SpaceAfter != null)
                {
                    rPLParagraphProps.SpaceAfter = new RPLReportSize(paragraphInstance.SpaceAfter.ToString());
                }
            }
            rPLParagraphProps.ParagraphNumber = this.m_paragraphNumber;
            rPLParagraphProps.NonSharedStyle  = this.WriteNonSharedStyle(null, null, pageContext, this.m_compiledSource);
        }
示例#22
0
        public override void WriteNonSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.Paragraph paragraph = base.m_source as AspNetCore.ReportingServices.OnDemandReportRendering.Paragraph;
            RSTrace.RenderingTracer.Assert(paragraph != null, "The paragraph definition cannot be null");
            ParagraphInstance paragraphInstance = null;
            bool flag = false;

            if (this.m_compiledSource != null)
            {
                paragraphInstance = this.m_compiledSource;
                flag = true;
            }
            else
            {
                paragraphInstance = paragraph.Instance;
                RSTrace.RenderingTracer.Assert(paragraphInstance != null, "The paragraph instance cannot be null");
            }
            spbifWriter.Write((byte)1);
            spbifWriter.Write((byte)4);
            spbifWriter.Write(paragraphInstance.UniqueName);
            if (!flag)
            {
                if (this.IsExpressionValue(paragraph.LeftIndent, paragraphInstance.LeftIndent))
                {
                    spbifWriter.Write((byte)9);
                    spbifWriter.Write(paragraphInstance.LeftIndent.ToString());
                }
                if (this.IsExpressionValue(paragraph.RightIndent, paragraphInstance.RightIndent))
                {
                    spbifWriter.Write((byte)10);
                    spbifWriter.Write(paragraphInstance.RightIndent.ToString());
                }
                if (this.IsExpressionValue(paragraph.HangingIndent, paragraphInstance.HangingIndent))
                {
                    spbifWriter.Write((byte)11);
                    spbifWriter.Write(paragraphInstance.HangingIndent.ToString());
                }
                if (paragraph.ListStyle.IsExpression)
                {
                    spbifWriter.Write((byte)7);
                    spbifWriter.Write(StyleEnumConverter.Translate(paragraphInstance.ListStyle));
                }
                if (paragraph.ListLevel.IsExpression)
                {
                    spbifWriter.Write((byte)8);
                    spbifWriter.Write(paragraphInstance.ListLevel);
                }
                if (this.IsExpressionValue(paragraph.SpaceBefore, paragraphInstance.SpaceBefore))
                {
                    spbifWriter.Write((byte)12);
                    spbifWriter.Write(paragraphInstance.SpaceBefore.ToString());
                }
                if (this.IsExpressionValue(paragraph.SpaceAfter, paragraphInstance.SpaceAfter))
                {
                    spbifWriter.Write((byte)13);
                    spbifWriter.Write(paragraphInstance.SpaceAfter.ToString());
                }
            }
            else
            {
                if (paragraphInstance.LeftIndent != null)
                {
                    spbifWriter.Write((byte)9);
                    spbifWriter.Write(paragraphInstance.LeftIndent.ToString());
                }
                if (paragraphInstance.RightIndent != null)
                {
                    spbifWriter.Write((byte)10);
                    spbifWriter.Write(paragraphInstance.RightIndent.ToString());
                }
                if (paragraphInstance.HangingIndent != null)
                {
                    spbifWriter.Write((byte)11);
                    spbifWriter.Write(paragraphInstance.HangingIndent.ToString());
                }
                spbifWriter.Write((byte)7);
                spbifWriter.Write(StyleEnumConverter.Translate(paragraphInstance.ListStyle));
                spbifWriter.Write((byte)8);
                spbifWriter.Write(paragraphInstance.ListLevel);
                if (paragraphInstance.SpaceBefore != null)
                {
                    spbifWriter.Write((byte)12);
                    spbifWriter.Write(paragraphInstance.SpaceBefore.ToString());
                }
                if (paragraphInstance.SpaceAfter != null)
                {
                    spbifWriter.Write((byte)13);
                    spbifWriter.Write(paragraphInstance.SpaceAfter.ToString());
                }
            }
            if (this.m_paragraphNumber > 0)
            {
                spbifWriter.Write((byte)14);
                spbifWriter.Write(this.m_paragraphNumber);
            }
            this.WriteNonSharedStyle(spbifWriter, null, null, pageContext, 6, this.m_compiledSource);
            spbifWriter.Write((byte)255);
        }
示例#23
0
        public override void WriteSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext, long offset)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.Paragraph paragraph = base.m_source as AspNetCore.ReportingServices.OnDemandReportRendering.Paragraph;
            RSTrace.RenderingTracer.Assert(paragraph != null, "The paragraph definition cannot be null");
            Hashtable hashtable = pageContext.ItemPropsStart;

            if (hashtable != null)
            {
                object obj = hashtable[this.SourceID];
                if (obj != null)
                {
                    spbifWriter.Write((byte)2);
                    spbifWriter.Write((long)obj);
                    return;
                }
            }
            if (hashtable == null)
            {
                hashtable = (pageContext.ItemPropsStart = new Hashtable());
            }
            hashtable.Add(this.SourceID, offset);
            spbifWriter.Write((byte)0);
            spbifWriter.Write((byte)5);
            spbifWriter.Write(this.SourceID);
            if (this.IsNotExpressionValue(paragraph.LeftIndent))
            {
                spbifWriter.Write((byte)9);
                spbifWriter.Write(paragraph.LeftIndent.Value.ToString());
            }
            if (this.IsNotExpressionValue(paragraph.RightIndent))
            {
                spbifWriter.Write((byte)10);
                spbifWriter.Write(paragraph.RightIndent.Value.ToString());
            }
            if (this.IsNotExpressionValue(paragraph.HangingIndent))
            {
                spbifWriter.Write((byte)11);
                spbifWriter.Write(paragraph.HangingIndent.Value.ToString());
            }
            if (!paragraph.ListStyle.IsExpression)
            {
                spbifWriter.Write((byte)7);
                spbifWriter.Write(StyleEnumConverter.Translate(paragraph.ListStyle.Value));
            }
            if (!paragraph.ListLevel.IsExpression)
            {
                spbifWriter.Write((byte)8);
                spbifWriter.Write(paragraph.ListLevel.Value);
            }
            if (this.IsNotExpressionValue(paragraph.SpaceBefore))
            {
                spbifWriter.Write((byte)12);
                spbifWriter.Write(paragraph.SpaceBefore.Value.ToString());
            }
            if (this.IsNotExpressionValue(paragraph.SpaceAfter))
            {
                spbifWriter.Write((byte)13);
                spbifWriter.Write(paragraph.SpaceAfter.Value.ToString());
            }
            this.WriteSharedStyle(spbifWriter, null, pageContext, 6);
            spbifWriter.Write((byte)255);
        }
示例#24
0
        public override void WriteCustomNonSharedItemProps(RPLElementProps nonSharedProps, RPLWriter rplWriter, PageContext pageContext)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.Image image = (AspNetCore.ReportingServices.OnDemandReportRendering.Image)base.m_source;
            ImageInstance imageInstance = (ImageInstance)image.Instance;

            System.Drawing.Image gdiImage      = null;
            RPLImageProps        rPLImageProps = (RPLImageProps)nonSharedProps;

            if (this.AutoSizeImage(pageContext, imageInstance, out gdiImage))
            {
                base.WriteImage(null, "InvalidImage", rPLImageProps, pageContext, gdiImage);
            }
            else
            {
                base.WriteImage(imageInstance, null, rPLImageProps, pageContext, gdiImage);
            }
            rPLImageProps.ActionInfo          = base.WriteActionInfo(image.ActionInfo, pageContext);
            rPLImageProps.ActionImageMapAreas = base.WriteImageMapAreaInstanceCollection(imageInstance.ActionInfoWithDynamicImageMapAreas, pageContext);
        }
示例#25
0
        public override void WriteCustomSharedItemProps(RPLElementPropsDef sharedProps, RPLWriter rplWriter, PageContext pageContext)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.Image image = (AspNetCore.ReportingServices.OnDemandReportRendering.Image)base.m_source;
            RPLImagePropsDef rPLImagePropsDef = (RPLImagePropsDef)sharedProps;

            switch (image.Sizing)
            {
            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.AutoSize:
                rPLImagePropsDef.Sizing = RPLFormat.Sizings.AutoSize;
                break;

            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.Clip:
                rPLImagePropsDef.Sizing = RPLFormat.Sizings.Clip;
                break;

            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.Fit:
                rPLImagePropsDef.Sizing = RPLFormat.Sizings.Fit;
                break;

            case AspNetCore.ReportingServices.OnDemandReportRendering.Image.Sizings.FitProportional:
                rPLImagePropsDef.Sizing = RPLFormat.Sizings.FitProportional;
                break;
            }
        }
示例#26
0
        public override void WriteNonSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext)
        {
            AspNetCore.ReportingServices.OnDemandReportRendering.TextRun textRun = base.m_source as AspNetCore.ReportingServices.OnDemandReportRendering.TextRun;
            RSTrace.RenderingTracer.Assert(textRun != null, "The text run definition cannot be null");
            TextRunInstance textRunInstance = null;
            bool            flag            = false;

            if (this.m_compiledSource != null)
            {
                textRunInstance = this.m_compiledSource;
                flag            = true;
            }
            else
            {
                textRunInstance = textRun.Instance;
                RSTrace.RenderingTracer.Assert(textRunInstance != null, "The text run instance cannot be null");
            }
            spbifWriter.Write((byte)1);
            spbifWriter.Write((byte)4);
            spbifWriter.Write(textRunInstance.UniqueName);
            if (!flag)
            {
                if (textRunInstance.ProcessedWithError)
                {
                    spbifWriter.Write((byte)13);
                    spbifWriter.Write(true);
                }
                if (textRun.MarkupType.IsExpression)
                {
                    spbifWriter.Write((byte)7);
                    spbifWriter.Write(StyleEnumConverter.Translate(textRunInstance.MarkupType));
                }
                if (textRun.ToolTip != null && textRun.ToolTip.IsExpression && textRunInstance.ToolTip != null)
                {
                    spbifWriter.Write((byte)9);
                    spbifWriter.Write(textRunInstance.ToolTip);
                }
                base.WriteActionInfo(textRun.ActionInfo, spbifWriter, pageContext, 11);
            }
            else
            {
                spbifWriter.Write((byte)7);
                spbifWriter.Write(StyleEnumConverter.Translate(textRunInstance.MarkupType));
                if (textRunInstance.ToolTip != null)
                {
                    spbifWriter.Write((byte)9);
                    spbifWriter.Write(textRunInstance.ToolTip);
                }
                if (this.m_compiledSource.ActionInstance != null)
                {
                    this.WriteActionInstance(this.m_compiledSource.ActionInstance, spbifWriter, pageContext);
                }
            }
            if ((pageContext.HideDuplicates || textRun.FormattedValueExpressionBased) && textRunInstance.Value != null)
            {
                spbifWriter.Write((byte)10);
                spbifWriter.Write(textRunInstance.Value);
            }
            pageContext.HideDuplicates    = false;
            pageContext.TypeCodeNonString = false;
            this.WriteNonSharedStyle(spbifWriter, null, null, pageContext, 6, this.m_compiledSource);
            spbifWriter.Write((byte)255);
        }
示例#27
0
        public override bool CalculatePage(RPLWriter rplWriter, PageItemHelper lastPageInfo, PageContext pageContext, PageItem[] siblings, RepeatWithItem[] repeatWithItems, double parentTopInPage, ref double parentPageHeight, Interactivity interactivity)
        {
            base.AdjustOriginFromItemsAbove(siblings, repeatWithItems);
            if (!this.HitsCurrentPage(pageContext, parentTopInPage))
            {
                return(false);
            }
            bool flag  = false;
            bool flag2 = false;

            this.CalculateIndexOfFirstBodyOnPage(lastPageInfo, out flag, out flag2);
            ItemSizes itemSizes = null;

            if (flag && base.ResolveItemHiddenState(rplWriter, interactivity, pageContext, false, ref itemSizes))
            {
                parentPageHeight = Math.Max(parentPageHeight, base.m_itemPageSizes.Bottom);
                if (rplWriter != null && base.m_itemRenderSizes == null)
                {
                    this.CreateItemRenderSizes(null, pageContext, false);
                }
                return(true);
            }
            this.WriteStartItemToStream(rplWriter, pageContext);
            this.CreateChildren(pageContext, lastPageInfo, flag2);
            AspNetCore.ReportingServices.OnDemandReportRendering.SubReport subReport = (AspNetCore.ReportingServices.OnDemandReportRendering.SubReport)base.m_source;
            PageContext pageContext2 = pageContext;

            if (!pageContext2.FullOnPage)
            {
                if (base.IgnorePageBreaks)
                {
                    pageContext2 = new PageContext(pageContext, PageContext.PageContextFlags.FullOnPage, PageContext.IgnorePBReasonFlag.Toggled);
                }
                else if (flag && subReport.KeepTogether && !pageContext2.KeepTogether)
                {
                    pageContext2 = new PageContext(pageContext);
                    pageContext2.KeepTogether = true;
                }
            }
            this.m_bodiesOnPage = 0;
            double num   = parentTopInPage + base.m_itemPageSizes.Top;
            double num2  = 0.0;
            double num3  = 0.0;
            double num4  = 0.0;
            bool   flag3 = false;

            for (int i = this.m_bodyIndex; i < this.m_childrenBody.Length; i++)
            {
                if (flag3)
                {
                    break;
                }
                PageItem pageItem = this.m_childrenBody[i];
                double   num5     = 0.0;
                if (flag2)
                {
                    pageItem.CalculatePage(rplWriter, lastPageInfo.ChildPage, pageContext2, null, null, num, ref num5, interactivity);
                    flag2 = false;
                }
                else
                {
                    pageItem.CalculatePage(rplWriter, null, pageContext2, null, null, num, ref num5, interactivity);
                }
                if (pageContext2.CancelPage)
                {
                    base.m_itemState    = State.Below;
                    base.m_rplElement   = null;
                    this.m_childrenBody = null;
                    return(false);
                }
                if (pageItem.ItemState == State.TopNextPage && i == 0)
                {
                    base.m_itemState = State.TopNextPage;
                    this.m_bodyIndex = -1;
                    return(false);
                }
                this.m_bodiesOnPage++;
                num             += num5;
                num2            += num5;
                base.m_itemState = State.OnPage;
                if (!pageContext2.FullOnPage)
                {
                    this.m_prevPageEnd = num2;
                    if (pageItem.ItemState != State.OnPage)
                    {
                        if (pageItem.ItemState == State.OnPagePBEnd && i == this.m_childrenBody.Length - 1)
                        {
                            base.m_itemState = State.OnPagePBEnd;
                        }
                        else
                        {
                            if (pageItem.ItemState == State.Below)
                            {
                                this.m_bodiesOnPage--;
                            }
                            base.m_itemState   = State.SpanPages;
                            this.m_prevPageEnd = 0.0;
                        }
                    }
                    if (base.m_itemState == State.SpanPages || base.m_itemState == State.OnPagePBEnd)
                    {
                        flag3 = true;
                    }
                    else if ((RoundedDouble)num >= pageContext2.PageHeight)
                    {
                        flag3 = true;
                        if (base.m_itemState == State.OnPage && i < this.m_childrenBody.Length - 1)
                        {
                            base.m_itemState = State.SpanPages;
                        }
                    }
                }
                if (rplWriter != null)
                {
                    num3  = Math.Max(num3, pageItem.ItemRenderSizes.Width);
                    num4 += pageItem.ItemRenderSizes.Height;
                }
            }
            if (itemSizes == null)
            {
                base.m_itemPageSizes.AdjustHeightTo(this.m_childrenBody[this.m_bodyIndex + this.m_bodiesOnPage - 1].ItemPageSizes.Bottom);
            }
            else
            {
                itemSizes.AdjustHeightTo(this.m_childrenBody[this.m_bodyIndex + this.m_bodiesOnPage - 1].ItemPageSizes.Bottom);
            }
            if (rplWriter != null)
            {
                this.CreateItemRenderSizes(itemSizes, pageContext2, false);
                base.m_itemRenderSizes.AdjustWidthTo(num3);
                base.m_itemRenderSizes.AdjustHeightTo(num4);
                this.WriteEndItemToStream(rplWriter, pageContext2);
            }
            if (base.m_itemState != State.SpanPages)
            {
                parentPageHeight = Math.Max(parentPageHeight, base.m_itemPageSizes.Bottom);
            }
            else
            {
                if (subReport.OmitBorderOnPageBreak)
                {
                    base.m_rplItemState |= 2;
                }
                parentPageHeight = Math.Max(parentPageHeight, base.m_itemPageSizes.Top + num2);
            }
            this.ReleaseBodyChildrenOnPage();
            this.m_bodyIndex += this.m_bodiesOnPage - 1;
            return(true);
        }
示例#28
0
 private void WriteStartItemToRPLOM(RPLWriter rplWriter, PageContext pageContext)
 {
     base.m_rplElement = new RPLSubReport();
     this.WriteElementProps(base.m_rplElement.ElementProps, rplWriter, pageContext);
 }
示例#29
0
 public override void WriteCustomNonSharedItemProps(RPLElementProps nonSharedProps, RPLWriter rplWriter, PageContext pageContext)
 {
     AspNetCore.ReportingServices.OnDemandReportRendering.Report report = ((AspNetCore.ReportingServices.OnDemandReportRendering.SubReport)base.m_source).Report;
     if (report != null && report.Language != null)
     {
         string text = null;
         if (report.Language.IsExpression)
         {
             ReportInstance instance = report.Instance;
             text = instance.Language;
         }
         else
         {
             text = report.Language.Value;
         }
         ((RPLSubReportProps)nonSharedProps).Language = text;
     }
 }
示例#30
0
 public override void WriteCustomSharedItemProps(RPLElementPropsDef sharedProps, RPLWriter rplWriter, PageContext pageContext)
 {
     AspNetCore.ReportingServices.OnDemandReportRendering.SubReport subReport = (AspNetCore.ReportingServices.OnDemandReportRendering.SubReport)base.m_source;
     if (subReport.ReportName != null)
     {
         ((RPLSubReportPropsDef)sharedProps).ReportName = subReport.ReportName;
     }
 }