Esempio n. 1
0
 public RPLTextRun GetNextTextRun()
 {
     if (m_textRuns != null)
     {
         if (m_textRuns.Count == 0)
         {
             m_textRuns = null;
             return(null);
         }
         return(m_textRuns.Dequeue());
     }
     if (m_textRunOffsets >= 0 && m_textRunCount > 0)
     {
         m_context.BinaryReader.BaseStream.Seek(m_textRunOffsets, SeekOrigin.Begin);
         long num = m_context.BinaryReader.ReadInt64();
         if (num == -1)
         {
             m_textRunOffsets = -1L;
             return(null);
         }
         m_textRunCount--;
         m_textRunOffsets += 8L;
         return(RPLReader.ReadTextRun(num, m_context));
     }
     return(null);
 }
Esempio n. 2
0
 public RPLReportSection GetNextReportSection()
 {
     if (m_context != null && m_context.VersionPicker == RPLVersionEnum.RPL2008)
     {
         if (m_sections != null)
         {
             m_sectionCount--;
             RPLReportSection result = m_sections.Dequeue();
             m_sections = null;
             return(result);
         }
         return(null);
     }
     if (m_sections != null)
     {
         m_sectionCount--;
         RPLReportSection result2 = m_sections.Dequeue();
         if (m_sections.Count == 0)
         {
             m_sections = null;
         }
         return(result2);
     }
     if (m_sectionCount == 0)
     {
         return(null);
     }
     m_sectionCount--;
     return(RPLReader.ReadReportSection(m_sectionOffsets[m_sectionOffsets.Length - m_sectionCount - 1], m_context));
 }
 public RPLParagraph GetNextParagraph()
 {
     if (this.m_paragraphs != null)
     {
         if (this.m_paragraphs.Count == 0)
         {
             this.m_paragraphs = null;
             return(null);
         }
         return(this.m_paragraphs.Dequeue());
     }
     if (this.m_paragraphOffsets >= 0 && this.m_paragraphCount > 0)
     {
         base.m_context.BinaryReader.BaseStream.Seek(this.m_paragraphOffsets, SeekOrigin.Begin);
         long num = base.m_context.BinaryReader.ReadInt64();
         if (num == -1)
         {
             this.m_paragraphOffsets = -1L;
             return(null);
         }
         this.m_paragraphCount--;
         this.m_paragraphOffsets += 8L;
         return(RPLReader.ReadParagraph(num, base.m_context));
     }
     return(null);
 }
        public RPLItem GetRPLItem()
        {
            if (m_endOffset <= 0)
            {
                return(null);
            }
            byte         itemType     = 0;
            BinaryReader binaryReader = m_context.BinaryReader;
            long         num          = RPLReader.ResolveReportItemEnd(m_endOffset, binaryReader, ref itemType);

            switch (itemType)
            {
            case 16:
            {
                RPLItemMeasurement[] children = RPLReader.ReadItemMeasurements(m_context, binaryReader);
                itemType = RPLReader.ReadItemType(num, binaryReader);
                return(RPLContainer.CreateItem(num, m_context, children, itemType));
            }

            case 17:
            {
                RPLTablix rPLTablix = new RPLTablix(num, m_context);
                RPLReader.ReadTablixStructure(rPLTablix, m_context, binaryReader);
                return(rPLTablix);
            }

            case 18:
                return(RPLReader.ReadTextBoxStructure(num, m_context));

            default:
                return(RPLItem.CreateItem(num, m_context, itemType));
            }
        }
 public RPLItemProps GetItemProps(long startOffset, out byte elementType)
 {
     elementType = 0;
     if (startOffset >= 0 && this.m_rplContext.BinaryReader != null)
     {
         return(RPLReader.ReadElementProps(startOffset, this.m_rplContext, out elementType));
     }
     return(null);
 }
 public RPLTablixRow GetNextRow()
 {
     if (this.m_rows != null)
     {
         if (this.m_rows.Count == 0)
         {
             this.m_rows = null;
             return(null);
         }
         return(this.m_rows.Dequeue());
     }
     if (this.m_nextRowStart >= 0)
     {
         return(RPLReader.ReadTablixRow(this.m_nextRowStart, base.m_context, this.m_tablixRowMembersDef, this.m_tablixColMembersDef, ref this.m_nextRowStart));
     }
     return(null);
 }
        public RPLItemProps GetItemProps(object rplSource, out byte elementType)
        {
            elementType = 0;
            RPLItemProps rPLItemProps = rplSource as RPLItemProps;

            if (rPLItemProps != null)
            {
                if (rPLItemProps is RPLTextBoxProps)
                {
                    elementType = 7;
                }
                else if (rPLItemProps is RPLChartProps)
                {
                    elementType = 11;
                }
                else if (rPLItemProps is RPLGaugePanelProps)
                {
                    elementType = 14;
                }
                else if (rPLItemProps is RPLMapProps)
                {
                    elementType = 21;
                }
                else if (rPLItemProps is RPLImageProps)
                {
                    elementType = 9;
                }
                else if (rPLItemProps is RPLLineProps)
                {
                    elementType = 8;
                }
                return(rPLItemProps);
            }
            long num = (long)rplSource;

            if (num >= 0 && this.m_rplContext.BinaryReader != null)
            {
                return(RPLReader.ReadElementProps(num, this.m_rplContext, out elementType));
            }
            return(null);
        }
Esempio n. 8
0
        internal RPLPageContent(long endOffset, RPLContext context, Version rplVersion)
        {
            m_endOffset = endOffset;
            m_context   = context;
            switch (m_context.VersionPicker)
            {
            case RPLVersionEnum.RPL2008:
            case RPLVersionEnum.RPL2008WithImageConsolidation:
                RPLReader.ReadPageContent2008(this, endOffset, context);
                break;

            case RPLVersionEnum.RPLAccess:
            case RPLVersionEnum.RPLMap:
            case RPLVersionEnum.RPL2009:
                RPLReader.ReadPageContent(this, endOffset, context);
                break;

            default:
                throw new ArgumentException(RPLRes.UnsupportedRPLVersion(rplVersion.ToString(3), "10.6"));
            }
        }
Esempio n. 9
0
 public Report(AspNetCore.ReportingServices.OnDemandReportRendering.Report report, PageContext pageContext, string rplVersion, bool defaultVersion)
 {
     this.m_report      = report;
     this.m_pageContext = pageContext;
     if (!string.IsNullOrEmpty(rplVersion))
     {
         char[] separator = new char[1]
         {
             '.'
         };
         string[] array = rplVersion.Split(separator);
         if (array.Length < 2)
         {
             this.m_rplVersion = new Version(10, 3, 0);
         }
         else
         {
             int major = SPBProcessing.ParseInt(array[0], 10);
             int minor = SPBProcessing.ParseInt(array[1], 3);
             int build = 0;
             if (array.Length > 2)
             {
                 build = SPBProcessing.ParseInt(array[2], 0);
             }
             this.m_rplVersion = new Version(major, minor, build);
         }
     }
     else if (defaultVersion)
     {
         this.m_rplVersion = new Version(10, 3, 0);
     }
     else
     {
         this.m_rplVersion = new Version(10, 6, 0);
     }
     this.m_pageContext.VersionPicker = RPLReader.CompareRPLVersions(this.m_rplVersion);
 }
Esempio n. 10
0
 public RPLReport(BinaryReader reader)
 {
     this.m_rplContext = new RPLContext(reader);
     RPLReader.ReadReport(this, this.m_rplContext);
 }