Beispiel #1
0
        internal override void WriteSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext, long offset)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.TextRun textRun = m_source as Microsoft.ReportingServices.OnDemandReportRendering.TextRun;
            RSTrace.RenderingTracer.Assert(textRun != null, "The text run definition cannot be null");
            Hashtable hashtable = pageContext.ItemPropsStart;

            if (hashtable != null)
            {
                object obj = hashtable[SourceID];
                if (obj != null)
                {
                    spbifWriter.Write((byte)2);
                    spbifWriter.Write((long)obj);
                    return;
                }
            }
            if (hashtable == null)
            {
                hashtable = (pageContext.ItemPropsStart = new Hashtable());
            }
            hashtable.Add(SourceID, offset);
            spbifWriter.Write((byte)0);
            spbifWriter.Write((byte)5);
            spbifWriter.Write(SourceID);
            if (!textRun.MarkupType.IsExpression)
            {
                spbifWriter.Write((byte)7);
                spbifWriter.Write(StyleEnumConverter.Translate(textRun.MarkupType.Value));
            }
            if (textRun.Label != null)
            {
                spbifWriter.Write((byte)8);
                spbifWriter.Write(textRun.Label);
            }
            if (textRun.ToolTip != null && !textRun.ToolTip.IsExpression && textRun.ToolTip.Value != null)
            {
                spbifWriter.Write((byte)9);
                spbifWriter.Write(textRun.ToolTip.Value);
            }
            if (textRun.Value.IsExpression)
            {
                spbifWriter.Write((byte)12);
                spbifWriter.Write(textRun.Value.ExpressionString);
            }
            if (!pageContext.HideDuplicates && !textRun.FormattedValueExpressionBased && textRun.Value.Value != null)
            {
                spbifWriter.Write((byte)10);
                if (textRun.SharedTypeCode == TypeCode.String)
                {
                    spbifWriter.Write(textRun.Value.Value);
                }
                else
                {
                    spbifWriter.Write(textRun.Instance.Value);
                }
            }
            WriteSharedStyle(spbifWriter, null, pageContext, 6);
            spbifWriter.Write(byte.MaxValue);
        }
        internal override void WriteSharedItemProps(RPLElementProps elemProps, RPLWriter rplWriter, PageContext pageContext)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.Paragraph paragraph = m_source as Microsoft.ReportingServices.OnDemandReportRendering.Paragraph;
            RSTrace.RenderingTracer.Assert(paragraph != null, "The paragraph definition cannot be null");
            Hashtable hashtable = pageContext.ItemPropsStart;

            if (hashtable != null)
            {
                object obj = hashtable[SourceID];
                if (obj != null)
                {
                    elemProps.Definition = (RPLParagraphPropsDef)obj;
                    return;
                }
            }
            RPLParagraphPropsDef rPLParagraphPropsDef = (elemProps as RPLParagraphProps).Definition as RPLParagraphPropsDef;

            if (hashtable == null)
            {
                hashtable = (pageContext.ItemPropsStart = new Hashtable());
            }
            hashtable.Add(SourceID, rPLParagraphPropsDef);
            rPLParagraphPropsDef.ID = SourceID;
            if (IsNotExpressionValue(paragraph.LeftIndent))
            {
                rPLParagraphPropsDef.LeftIndent = new RPLReportSize(paragraph.LeftIndent.Value.ToString());
            }
            if (IsNotExpressionValue(paragraph.RightIndent))
            {
                rPLParagraphPropsDef.RightIndent = new RPLReportSize(paragraph.RightIndent.Value.ToString());
            }
            if (IsNotExpressionValue(paragraph.HangingIndent))
            {
                rPLParagraphPropsDef.HangingIndent = new RPLReportSize(paragraph.HangingIndent.Value.ToString());
            }
            if (!paragraph.ListStyle.IsExpression)
            {
                rPLParagraphPropsDef.ListStyle = (RPLFormat.ListStyles)StyleEnumConverter.Translate(paragraph.ListStyle.Value);
            }
            if (!paragraph.ListLevel.IsExpression)
            {
                rPLParagraphPropsDef.ListLevel = paragraph.ListLevel.Value;
            }
            if (IsNotExpressionValue(paragraph.SpaceBefore))
            {
                rPLParagraphPropsDef.SpaceBefore = new RPLReportSize(paragraph.SpaceBefore.Value.ToString());
            }
            if (IsNotExpressionValue(paragraph.SpaceAfter))
            {
                rPLParagraphPropsDef.SpaceAfter = new RPLReportSize(paragraph.SpaceAfter.Value.ToString());
            }
            rPLParagraphPropsDef.SharedStyle = WriteSharedStyle(null, pageContext);
        }
Beispiel #3
0
        internal override void WriteNonSharedItemProps(RPLElementProps elemProps, RPLWriter rplWriter, PageContext pageContext)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.TextRun textRun = m_source as Microsoft.ReportingServices.OnDemandReportRendering.TextRun;
            RSTrace.RenderingTracer.Assert(textRun != null, "The text run definition cannot be null");
            TextRunInstance textRunInstance = null;
            bool            flag            = false;

            if (m_compiledSource != null)
            {
                textRunInstance = m_compiledSource;
                flag            = true;
            }
            else
            {
                textRunInstance = textRun.Instance;
                RSTrace.RenderingTracer.Assert(textRunInstance != null, "The text run instance cannot be null");
            }
            elemProps.UniqueName = textRunInstance.UniqueName;
            RPLTextRunProps rPLTextRunProps = elemProps as RPLTextRunProps;

            if (!flag)
            {
                rPLTextRunProps.ProcessedWithError = textRunInstance.ProcessedWithError;
                if (textRun.MarkupType.IsExpression)
                {
                    rPLTextRunProps.Markup = (RPLFormat.MarkupStyles)StyleEnumConverter.Translate(textRunInstance.MarkupType);
                }
                if (textRun.ToolTip != null && textRun.ToolTip.IsExpression && textRunInstance.ToolTip != null)
                {
                    rPLTextRunProps.ToolTip = textRunInstance.ToolTip;
                }
                rPLTextRunProps.ActionInfo = WriteActionInfo(textRun.ActionInfo, pageContext);
            }
            else
            {
                rPLTextRunProps.Markup = (RPLFormat.MarkupStyles)StyleEnumConverter.Translate(textRunInstance.MarkupType);
                if (textRunInstance.ToolTip != null)
                {
                    rPLTextRunProps.ToolTip = textRunInstance.ToolTip;
                }
                if (m_compiledSource.ActionInstance != null)
                {
                    rPLTextRunProps.ActionInfo = WriteActionInstance(m_compiledSource.ActionInstance, pageContext);
                }
            }
            if ((pageContext.HideDuplicates || textRun.FormattedValueExpressionBased) && textRunInstance.Value != null)
            {
                rPLTextRunProps.Value = textRunInstance.Value;
            }
            pageContext.HideDuplicates     = false;
            pageContext.TypeCodeNonString  = false;
            rPLTextRunProps.NonSharedStyle = WriteNonSharedStyle(null, null, pageContext, m_compiledSource);
        }
Beispiel #4
0
        internal override void WriteSharedItemProps(RPLElementProps elemProps, RPLWriter rplWriter, PageContext pageContext)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.TextRun textRun = m_source as Microsoft.ReportingServices.OnDemandReportRendering.TextRun;
            RSTrace.RenderingTracer.Assert(textRun != null, "The text run definition cannot be null");
            Hashtable hashtable = pageContext.ItemPropsStart;

            if (hashtable != null)
            {
                object obj = hashtable[SourceID];
                if (obj != null)
                {
                    elemProps.Definition = (RPLTextRunPropsDef)obj;
                    return;
                }
            }
            RPLTextRunPropsDef rPLTextRunPropsDef = (elemProps as RPLTextRunProps).Definition as RPLTextRunPropsDef;

            if (hashtable == null)
            {
                hashtable = (pageContext.ItemPropsStart = new Hashtable());
            }
            hashtable.Add(SourceID, rPLTextRunPropsDef);
            rPLTextRunPropsDef.ID = SourceID;
            if (!textRun.MarkupType.IsExpression)
            {
                rPLTextRunPropsDef.Markup = (RPLFormat.MarkupStyles)StyleEnumConverter.Translate(textRun.MarkupType.Value);
            }
            if (textRun.Label != null)
            {
                rPLTextRunPropsDef.Label = textRun.Label;
            }
            if (textRun.ToolTip != null && !textRun.ToolTip.IsExpression && textRun.ToolTip.Value != null)
            {
                rPLTextRunPropsDef.ToolTip = textRun.ToolTip.Value;
            }
            if (textRun.Value.IsExpression)
            {
                rPLTextRunPropsDef.Formula = textRun.Value.ExpressionString;
            }
            if (!pageContext.HideDuplicates && !textRun.FormattedValueExpressionBased && textRun.Value.Value != null)
            {
                if (textRun.SharedTypeCode == TypeCode.String)
                {
                    rPLTextRunPropsDef.Value = textRun.Value.Value;
                }
                else
                {
                    rPLTextRunPropsDef.Value = textRun.Instance.Value;
                }
            }
            rPLTextRunPropsDef.SharedStyle = WriteSharedStyle(null, pageContext);
        }
        internal override void WriteNonSharedItemProps(RPLElementProps elemProps, RPLWriter rplWriter, PageContext pageContext)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.Paragraph paragraph = m_source as Microsoft.ReportingServices.OnDemandReportRendering.Paragraph;
            RSTrace.RenderingTracer.Assert(paragraph != null, "The paragraph definition cannot be null");
            ParagraphInstance paragraphInstance = null;
            bool flag = false;

            if (m_compiledSource != null)
            {
                paragraphInstance = 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 (IsExpressionValue(paragraph.LeftIndent, paragraphInstance.LeftIndent))
                {
                    rPLParagraphProps.LeftIndent = new RPLReportSize(paragraphInstance.LeftIndent.ToString());
                }
                if (IsExpressionValue(paragraph.RightIndent, paragraphInstance.RightIndent))
                {
                    rPLParagraphProps.RightIndent = new RPLReportSize(paragraphInstance.RightIndent.ToString());
                }
                if (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 (IsExpressionValue(paragraph.SpaceBefore, paragraphInstance.SpaceBefore))
                {
                    rPLParagraphProps.SpaceBefore = new RPLReportSize(paragraphInstance.SpaceBefore.ToString());
                }
                if (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 = m_paragraphNumber;
            rPLParagraphProps.NonSharedStyle  = WriteNonSharedStyle(null, null, pageContext, m_compiledSource);
        }
        internal override void WriteNonSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.Paragraph paragraph = m_source as Microsoft.ReportingServices.OnDemandReportRendering.Paragraph;
            RSTrace.RenderingTracer.Assert(paragraph != null, "The paragraph definition cannot be null");
            ParagraphInstance paragraphInstance = null;
            bool flag = false;

            if (m_compiledSource != null)
            {
                paragraphInstance = 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 (IsExpressionValue(paragraph.LeftIndent, paragraphInstance.LeftIndent))
                {
                    spbifWriter.Write((byte)9);
                    spbifWriter.Write(paragraphInstance.LeftIndent.ToString());
                }
                if (IsExpressionValue(paragraph.RightIndent, paragraphInstance.RightIndent))
                {
                    spbifWriter.Write((byte)10);
                    spbifWriter.Write(paragraphInstance.RightIndent.ToString());
                }
                if (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 (IsExpressionValue(paragraph.SpaceBefore, paragraphInstance.SpaceBefore))
                {
                    spbifWriter.Write((byte)12);
                    spbifWriter.Write(paragraphInstance.SpaceBefore.ToString());
                }
                if (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 (m_paragraphNumber > 0)
            {
                spbifWriter.Write((byte)14);
                spbifWriter.Write(m_paragraphNumber);
            }
            WriteNonSharedStyle(spbifWriter, null, null, pageContext, 6, m_compiledSource);
            spbifWriter.Write(byte.MaxValue);
        }
        internal override void WriteSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext, long offset)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.Paragraph paragraph = m_source as Microsoft.ReportingServices.OnDemandReportRendering.Paragraph;
            RSTrace.RenderingTracer.Assert(paragraph != null, "The paragraph definition cannot be null");
            Hashtable hashtable = pageContext.ItemPropsStart;

            if (hashtable != null)
            {
                object obj = hashtable[SourceID];
                if (obj != null)
                {
                    spbifWriter.Write((byte)2);
                    spbifWriter.Write((long)obj);
                    return;
                }
            }
            if (hashtable == null)
            {
                hashtable = (pageContext.ItemPropsStart = new Hashtable());
            }
            hashtable.Add(SourceID, offset);
            spbifWriter.Write((byte)0);
            spbifWriter.Write((byte)5);
            spbifWriter.Write(SourceID);
            if (IsNotExpressionValue(paragraph.LeftIndent))
            {
                spbifWriter.Write((byte)9);
                spbifWriter.Write(paragraph.LeftIndent.Value.ToString());
            }
            if (IsNotExpressionValue(paragraph.RightIndent))
            {
                spbifWriter.Write((byte)10);
                spbifWriter.Write(paragraph.RightIndent.Value.ToString());
            }
            if (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 (IsNotExpressionValue(paragraph.SpaceBefore))
            {
                spbifWriter.Write((byte)12);
                spbifWriter.Write(paragraph.SpaceBefore.Value.ToString());
            }
            if (IsNotExpressionValue(paragraph.SpaceAfter))
            {
                spbifWriter.Write((byte)13);
                spbifWriter.Write(paragraph.SpaceAfter.Value.ToString());
            }
            WriteSharedStyle(spbifWriter, null, pageContext, 6);
            spbifWriter.Write(byte.MaxValue);
        }
Beispiel #8
0
        internal override void WriteNonSharedItemProps(BinaryWriter spbifWriter, RPLWriter rplWriter, PageContext pageContext)
        {
            Microsoft.ReportingServices.OnDemandReportRendering.TextRun textRun = m_source as Microsoft.ReportingServices.OnDemandReportRendering.TextRun;
            RSTrace.RenderingTracer.Assert(textRun != null, "The text run definition cannot be null");
            TextRunInstance textRunInstance = null;
            bool            flag            = false;

            if (m_compiledSource != null)
            {
                textRunInstance = 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(value: 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);
                }
                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 (m_compiledSource.ActionInstance != null)
                {
                    WriteActionInstance(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;
            WriteNonSharedStyle(spbifWriter, null, null, pageContext, 6, m_compiledSource);
            spbifWriter.Write(byte.MaxValue);
        }