コード例 #1
0
        private RPLActionInfo WriteActionInstance(ActionInstance actionInst, PageContext pageContext)
        {
            if (actionInst == null)
            {
                return(null);
            }
            RPLActionInfo rPLActionInfo = new RPLActionInfo(1);
            RPLAction     rPLAction     = null;

            rPLAction = ((actionInst.Label == null) ? new RPLAction() : new RPLAction(actionInst.Label));
            if (actionInst.Hyperlink != null)
            {
                ReportUrl hyperlink = actionInst.Hyperlink;
                if (hyperlink != null)
                {
                    Uri uri = hyperlink.ToUri();
                    if ((Uri)null != uri)
                    {
                        rPLAction.Hyperlink = uri.AbsoluteUri;
                    }
                }
            }
            else if (actionInst.BookmarkLink != null)
            {
                rPLAction.BookmarkLink = actionInst.BookmarkLink;
            }
            rPLActionInfo.Actions[0] = rPLAction;
            return(rPLActionInfo);
        }
コード例 #2
0
 private void WriteActionInstance(ActionInstance actionInst, BinaryWriter spbifWriter, PageContext pageContext)
 {
     if (actionInst != null)
     {
         spbifWriter.Write((byte)11);
         spbifWriter.Write((byte)2);
         spbifWriter.Write(1);
         spbifWriter.Write((byte)3);
         if (actionInst.Label != null)
         {
             spbifWriter.Write((byte)4);
             spbifWriter.Write(actionInst.Label);
         }
         if (actionInst.Hyperlink != null)
         {
             ReportUrl hyperlink = actionInst.Hyperlink;
             if (hyperlink != null)
             {
                 Uri uri = hyperlink.ToUri();
                 if ((Uri)null != uri)
                 {
                     spbifWriter.Write((byte)6);
                     spbifWriter.Write(uri.AbsoluteUri);
                 }
             }
         }
         else if (actionInst.BookmarkLink != null)
         {
             spbifWriter.Write((byte)7);
             spbifWriter.Write(actionInst.BookmarkLink);
         }
         spbifWriter.Write((byte)255);
         spbifWriter.Write((byte)255);
     }
 }
コード例 #3
0
 internal ReportUrlProperty(bool isExpression, string expressionString, ReportUrl reportUrl)
     : base(isExpression, expressionString)
 {
     if (!isExpression)
     {
         m_reportUrl = reportUrl;
     }
 }
コード例 #4
0
 public ReportUrlProperty(bool isExpression, string expressionString, ReportUrl reportUrl)
     : base(isExpression, expressionString)
 {
     if (!isExpression)
     {
         this.m_reportUrl = reportUrl;
     }
 }
コード例 #5
0
        public TextRun(TextRunInstance instance, bool hideDuplicates)
        {
            this.m_source = instance.Definition;
            Utility.AddInstanceStyles(instance.Style, ref this.m_styles);
            if (instance.IsCompiled)
            {
                this.m_text    = instance.Value;
                this.m_toolTip = instance.ToolTip;
            }
            else
            {
                this.m_text    = ((this.m_source.Value != null && (this.m_source.FormattedValueExpressionBased || hideDuplicates)) ? instance.Value : null);
                this.m_toolTip = ((this.m_source.ToolTip != null && this.m_source.ToolTip.IsExpression) ? instance.ToolTip : null);
            }
            ActionInfo actionInfo = this.m_source.ActionInfo;

            if (instance.IsCompiled)
            {
                CompiledTextRunInstance compiledTextRunInstance = instance as CompiledTextRunInstance;
                ActionInstance          actionInstance          = compiledTextRunInstance.ActionInstance;
                if (actionInstance != null)
                {
                    this.m_hyperlinks = new List <string>(1);
                    ReportUrl hyperlink = actionInstance.Hyperlink;
                    string    item      = null;
                    if (hyperlink != null)
                    {
                        item = hyperlink.ToString();
                    }
                    this.m_hyperlinks.Add(item);
                }
            }
            else if (actionInfo != null)
            {
                ActionCollection actions = actionInfo.Actions;
                this.m_hyperlinks = new List <string>(actions.Count);
                foreach (AspNetCore.ReportingServices.OnDemandReportRendering.Action item3 in actions)
                {
                    ReportUrl hyperlink2 = item3.Instance.Hyperlink;
                    string    item2      = null;
                    if (hyperlink2 != null)
                    {
                        item2 = hyperlink2.ToString();
                    }
                    this.m_hyperlinks.Add(item2);
                }
            }
            this.m_uniqueName = instance.UniqueName;
            if (this.m_source.MarkupType != null && this.m_source.MarkupType.IsExpression)
            {
                this.m_markup = StyleEnumConverter.Translate(instance.MarkupType);
            }
        }
コード例 #6
0
        private void WriteStartItemToRPLStream(BinaryWriter spbifWriter, string language)
        {
            Stream baseStream = spbifWriter.BaseStream;

            this.m_offset = baseStream.Position;
            spbifWriter.Write((byte)0);
            spbifWriter.Write((byte)2);
            if (this.m_report.Name != null)
            {
                spbifWriter.Write((byte)15);
                spbifWriter.Write(this.m_report.Name);
            }
            if (this.m_report.Description != null)
            {
                spbifWriter.Write((byte)9);
                spbifWriter.Write(this.m_report.Description);
            }
            if (this.m_report.Author != null)
            {
                spbifWriter.Write((byte)13);
                spbifWriter.Write(this.m_report.Author);
            }
            if (this.m_report.AutoRefresh > 0)
            {
                spbifWriter.Write((byte)14);
                spbifWriter.Write(this.m_report.AutoRefresh);
            }
            DateTime executionTime = this.m_report.ExecutionTime;

            spbifWriter.Write((byte)12);
            spbifWriter.Write(executionTime.ToBinary());
            ReportUrl location = this.m_report.Location;

            if (location != null)
            {
                spbifWriter.Write((byte)10);
                spbifWriter.Write(location.ToString());
            }
            if (language != null)
            {
                spbifWriter.Write((byte)11);
                spbifWriter.Write(language);
            }
            if (this.m_report.ConsumeContainerWhitespace)
            {
                spbifWriter.Write((byte)50);
                spbifWriter.Write(this.m_report.ConsumeContainerWhitespace);
            }
            spbifWriter.Write((byte)255);
            this.m_pageContentOffset = baseStream.Position;
            spbifWriter.Write((byte)19);
        }
コード例 #7
0
        private void WriteStartItemToRPLStream2008(BinaryWriter spbifWriter, string language)
        {
            Stream baseStream = spbifWriter.BaseStream;

            m_offset = baseStream.Position;
            spbifWriter.Write((byte)0);
            spbifWriter.Write((byte)2);
            if (m_report.Name != null)
            {
                spbifWriter.Write((byte)15);
                spbifWriter.Write(m_report.Name);
            }
            if (m_report.Description != null)
            {
                spbifWriter.Write((byte)9);
                spbifWriter.Write(m_report.Description);
            }
            if (m_report.Author != null)
            {
                spbifWriter.Write((byte)13);
                spbifWriter.Write(m_report.Author);
            }
            if (m_report.AutoRefresh > 0)
            {
                spbifWriter.Write((byte)14);
                spbifWriter.Write(m_report.AutoRefresh);
            }
            DateTime executionTime = m_report.ExecutionTime;

            spbifWriter.Write((byte)12);
            spbifWriter.Write(executionTime.ToBinary());
            ReportUrl location = m_report.Location;

            if (location != null)
            {
                spbifWriter.Write((byte)10);
                spbifWriter.Write(location.ToString());
            }
            if (language != null)
            {
                spbifWriter.Write((byte)11);
                spbifWriter.Write(language);
            }
            spbifWriter.Write(byte.MaxValue);
            m_pageContentOffset = baseStream.Position;
            spbifWriter.Write((byte)19);
            m_columnsOffset = baseStream.Position;
            spbifWriter.Write((byte)20);
            WriteStartReportBodyToRPLStream2008(spbifWriter);
        }
コード例 #8
0
        internal void WriteStartItemToStream(RPLWriter rplWriter)
        {
            if (rplWriter == null)
            {
                return;
            }
            BinaryWriter binaryWriter   = rplWriter.BinaryWriter;
            string       reportLanguage = GetReportLanguage(m_report);

            if (binaryWriter != null)
            {
                Stream baseStream = binaryWriter.BaseStream;
                m_offset = baseStream.Position;
                binaryWriter.Write((byte)0);
                binaryWriter.Write((byte)2);
                if (m_report.Name != null)
                {
                    binaryWriter.Write((byte)15);
                    binaryWriter.Write(m_report.Name);
                }
                if (m_report.Description != null)
                {
                    binaryWriter.Write((byte)9);
                    binaryWriter.Write(m_report.Description);
                }
                if (m_report.Author != null)
                {
                    binaryWriter.Write((byte)13);
                    binaryWriter.Write(m_report.Author);
                }
                if (m_report.AutoRefresh > 0)
                {
                    binaryWriter.Write((byte)14);
                    binaryWriter.Write(m_report.AutoRefresh);
                }
                DateTime executionTime = m_report.ExecutionTime;
                binaryWriter.Write((byte)12);
                binaryWriter.Write(executionTime.ToBinary());
                ReportUrl location = m_report.Location;
                if (location != null)
                {
                    binaryWriter.Write((byte)10);
                    binaryWriter.Write(location.ToString());
                }
                if (reportLanguage != null)
                {
                    binaryWriter.Write((byte)11);
                    binaryWriter.Write(reportLanguage);
                }
                binaryWriter.Write(byte.MaxValue);
                m_pageOffset = baseStream.Position;
                binaryWriter.Write((byte)19);
                binaryWriter.Write((byte)3);
                binaryWriter.Write((byte)16);
                binaryWriter.Write((float)m_pageSettings.PhysicalPageHeight);
                binaryWriter.Write((byte)17);
                binaryWriter.Write((float)m_pageSettings.PhysicalPageWidth);
                binaryWriter.Write((byte)20);
                binaryWriter.Write((float)m_pageSettings.MarginBottom);
                binaryWriter.Write((byte)19);
                binaryWriter.Write((float)m_pageSettings.MarginLeft);
                binaryWriter.Write((byte)21);
                binaryWriter.Write((float)m_pageSettings.MarginRight);
                binaryWriter.Write((byte)18);
                binaryWriter.Write((float)m_pageSettings.MarginTop);
                new ReportSectionPage(m_report.ReportSections[0].Page).WriteItemStyle(rplWriter, m_pageContext);
                binaryWriter.Write(byte.MaxValue);
            }
            else
            {
                RPLReport rPLReport = new RPLReport();
                rPLReport.ReportName        = m_report.Name;
                rPLReport.Description       = m_report.Description;
                rPLReport.Author            = m_report.Author;
                rPLReport.AutoRefresh       = m_report.AutoRefresh;
                rPLReport.ExecutionTime     = m_report.ExecutionTime;
                rPLReport.Location          = m_report.Location.ToString();
                rPLReport.Language          = reportLanguage;
                rPLReport.RPLVersion        = m_rplVersion;
                rPLReport.RPLPaginatedPages = new RPLPageContent[1];
                rplWriter.Report            = rPLReport;
            }
        }
コード例 #9
0
 public void WriteStartItemToStream(RPLWriter rplWriter)
 {
     if (rplWriter != null)
     {
         BinaryWriter binaryWriter   = rplWriter.BinaryWriter;
         string       reportLanguage = Report.GetReportLanguage(this.m_report);
         if (binaryWriter != null)
         {
             Stream baseStream = binaryWriter.BaseStream;
             this.m_offset = baseStream.Position;
             binaryWriter.Write((byte)0);
             binaryWriter.Write((byte)2);
             if (this.m_report.Name != null)
             {
                 binaryWriter.Write((byte)15);
                 binaryWriter.Write(this.m_report.Name);
             }
             if (this.m_report.Description != null)
             {
                 binaryWriter.Write((byte)9);
                 binaryWriter.Write(this.m_report.Description);
             }
             if (this.m_report.Author != null)
             {
                 binaryWriter.Write((byte)13);
                 binaryWriter.Write(this.m_report.Author);
             }
             if (this.m_report.AutoRefresh > 0)
             {
                 binaryWriter.Write((byte)14);
                 binaryWriter.Write(this.m_report.AutoRefresh);
             }
             DateTime executionTime = this.m_report.ExecutionTime;
             binaryWriter.Write((byte)12);
             binaryWriter.Write(executionTime.ToBinary());
             ReportUrl location = this.m_report.Location;
             if (location != null)
             {
                 binaryWriter.Write((byte)10);
                 binaryWriter.Write(location.ToString());
             }
             if (reportLanguage != null)
             {
                 binaryWriter.Write((byte)11);
                 binaryWriter.Write(reportLanguage);
             }
             binaryWriter.Write((byte)255);
             this.m_pageOffset = baseStream.Position;
             binaryWriter.Write((byte)19);
             binaryWriter.Write((byte)3);
             binaryWriter.Write((byte)16);
             binaryWriter.Write((float)this.m_pageSettings.PhysicalPageHeight);
             binaryWriter.Write((byte)17);
             binaryWriter.Write((float)this.m_pageSettings.PhysicalPageWidth);
             binaryWriter.Write((byte)20);
             binaryWriter.Write((float)this.m_pageSettings.MarginBottom);
             binaryWriter.Write((byte)19);
             binaryWriter.Write((float)this.m_pageSettings.MarginLeft);
             binaryWriter.Write((byte)21);
             binaryWriter.Write((float)this.m_pageSettings.MarginRight);
             binaryWriter.Write((byte)18);
             binaryWriter.Write((float)this.m_pageSettings.MarginTop);
             ReportSectionPage reportSectionPage = new ReportSectionPage(((ReportElementCollectionBase <AspNetCore.ReportingServices.OnDemandReportRendering.ReportSection>) this.m_report.ReportSections)[0].Page);
             reportSectionPage.WriteItemStyle(rplWriter, this.m_pageContext);
             binaryWriter.Write((byte)255);
         }
         else
         {
             RPLReport rPLReport = new RPLReport();
             rPLReport.ReportName        = this.m_report.Name;
             rPLReport.Description       = this.m_report.Description;
             rPLReport.Author            = this.m_report.Author;
             rPLReport.AutoRefresh       = this.m_report.AutoRefresh;
             rPLReport.ExecutionTime     = this.m_report.ExecutionTime;
             rPLReport.Location          = this.m_report.Location.ToString();
             rPLReport.Language          = reportLanguage;
             rPLReport.RPLVersion        = this.m_rplVersion;
             rPLReport.RPLPaginatedPages = new RPLPageContent[1];
             rplWriter.Report            = rPLReport;
         }
     }
 }