private void VisitTablixMemberCollection(TablixMemberCollection memberCollection, int rowMemberIndex, bool isTopLevel)
 {
     if (memberCollection == null)
     {
         return;
     }
     for (int i = 0; i < memberCollection.Count; i++)
     {
         Microsoft.ReportingServices.OnDemandReportRendering.TablixMember tablixMember = memberCollection[i];
         if (tablixMember.IsStatic)
         {
             VisitTablixMember(tablixMember, rowMemberIndex, null);
             continue;
         }
         TablixDynamicMemberInstance tablixDynamicMemberInstance = (TablixDynamicMemberInstance)tablixMember.Instance;
         Stack <int> stack = new Stack <int>();
         if (isTopLevel)
         {
             tablixDynamicMemberInstance.ResetContext();
         }
         while (tablixDynamicMemberInstance.MoveNext())
         {
             VisitTablixMember(tablixMember, rowMemberIndex, stack);
         }
         for (int j = 0; j < stack.Count; j++)
         {
             WriteDocumentMapEndContainer();
         }
     }
 }
        private void VisitTablixMember(Microsoft.ReportingServices.OnDemandReportRendering.TablixMember memberDef, int rowMemberIndex, Stack <int> openRecursiveLevels)
        {
            if (memberDef.Instance == null)
            {
                return;
            }
            bool generateDocMap = m_generateDocMap;

            if (!ProcessVisibilityAndContinue(memberDef.Visibility, memberDef.Instance.Visibility, memberDef))
            {
                return;
            }
            if (!memberDef.IsStatic && rowMemberIndex == -1 && memberDef.Group != null && m_generateDocMap)
            {
                GroupInstance instance         = memberDef.Group.Instance;
                string        documentMapLabel = instance.DocumentMapLabel;
                int           recursiveLevel   = instance.RecursiveLevel;
                if (documentMapLabel != null)
                {
                    while (openRecursiveLevels.Count > 0 && openRecursiveLevels.Peek() >= recursiveLevel)
                    {
                        WriteDocumentMapEndContainer();
                        openRecursiveLevels.Pop();
                    }
                    WriteDocumentMapBeginContainer(documentMapLabel, memberDef.Group.Instance.UniqueName);
                    openRecursiveLevels.Push(recursiveLevel);
                }
            }
            if (rowMemberIndex == -1 && memberDef.TablixHeader != null && memberDef.TablixHeader.CellContents != null)
            {
                Visit(memberDef.TablixHeader.CellContents.ReportItem);
            }
            if (memberDef.Children == null)
            {
                if (memberDef.IsColumn)
                {
                    if (rowMemberIndex != -1)
                    {
                        Microsoft.ReportingServices.OnDemandReportRendering.TablixCell tablixCell = memberDef.OwnerTablix.Body.RowCollection[rowMemberIndex][memberDef.MemberCellIndex];
                        if (tablixCell != null && tablixCell.CellContents != null)
                        {
                            Visit(tablixCell.CellContents.ReportItem);
                        }
                    }
                }
                else
                {
                    VisitTablixMemberCollection(memberDef.OwnerTablix.ColumnHierarchy.MemberCollection, memberDef.MemberCellIndex, isTopLevel: true);
                }
            }
            else
            {
                VisitTablixMemberCollection(memberDef.Children, rowMemberIndex, isTopLevel: false);
            }
            m_generateDocMap = generateDocMap;
        }
Example #3
0
 public override TablixMember this[int index]
 {
     get
     {
         if (index < 0 || index >= Count)
         {
             throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, index, 0, Count);
         }
         if (m_children == null)
         {
             m_children = new DataRegionMember[Count];
         }
         TablixMember tablixMember = (TablixMember)m_children[index];
         if (tablixMember == null)
         {
             tablixMember = (TablixMember)(m_children[index] = new ShimListMember(this, base.OwnerTablix, m_renderGroups, index, m_isColumnGroup));
         }
         return(tablixMember);
     }
 }
Example #4
0
 public override TablixMember this[int index]
 {
     get
     {
         if (index < 0 || index >= Count)
         {
             throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, index, 0, Count);
         }
         if (m_children == null)
         {
             m_children = new DataRegionMember[Count];
         }
         TablixMember tablixMember = (TablixMember)m_children[index];
         if (tablixMember == null)
         {
             IReportScope reportScope = (m_parent != null) ? m_parent.ReportScope : m_owner.ReportScope;
             tablixMember = (TablixMember)(m_children[index] = new InternalTablixMember(reportScope, this, base.OwnerTablix, m_parent, m_memberDefs[index], index));
         }
         return(tablixMember);
     }
 }
Example #5
0
 internal InternalTablixMember(IReportScope reportScope, IDefinitionPath parentDefinitionPath, Tablix owner, TablixMember parent, Microsoft.ReportingServices.ReportIntermediateFormat.TablixMember memberDef, int index)
     : base(parentDefinitionPath, owner, parent, index)
 {
     if (memberDef.IsStatic)
     {
         m_reportScope = reportScope;
     }
     m_owner     = owner;
     m_memberDef = memberDef;
     if (m_memberDef.Grouping != null)
     {
         m_group = new Group(base.OwnerTablix, m_memberDef, this);
     }
     m_memberDef.ROMScopeInstance = ReportScope.ReportScopeInstance;
     m_memberDef.ResetVisibilityComputationCache();
 }
Example #6
0
 internal InternalTablixMemberCollection(IDefinitionPath parentDefinitionPath, Tablix owner, TablixMember parent, TablixMemberList memberDefs)
     : base(parentDefinitionPath, owner)
 {
     m_parent     = parent;
     m_memberDefs = memberDefs;
 }
Example #7
0
 internal TablixDynamicMemberInstance(Tablix owner, TablixMember memberDef, InternalDynamicMemberLogic memberLogic)
     : base(owner, memberDef)
 {
     m_memberLogic = memberLogic;
     ResetContext();
 }
 internal TablixMember(IDefinitionPath parentDefinitionPath, Tablix owner, TablixMember parent, int parentCollectionIndex)
     : base(parentDefinitionPath, owner, parent, parentCollectionIndex)
 {
 }
        private bool ProcessVisibilityAndContinue(Microsoft.ReportingServices.OnDemandReportRendering.Visibility aVisibility, VisibilityInstance aVisibilityInstance, Microsoft.ReportingServices.OnDemandReportRendering.TablixMember memberDef)
        {
            if (aVisibility == null)
            {
                return(true);
            }
            if (aVisibilityInstance != null && m_createSnapshot)
            {
                _ = aVisibilityInstance.StartHidden;
            }
            switch (aVisibility.HiddenState)
            {
            case SharedHiddenState.Always:
                if (m_createSnapshot)
                {
                    m_generateDocMap = false;
                    return(true);
                }
                return(false);

            case SharedHiddenState.Sometimes:
                if (aVisibilityInstance.CurrentlyHidden && aVisibility.ToggleItem == null)
                {
                    if (m_createSnapshot)
                    {
                        m_generateDocMap = false;
                        return(true);
                    }
                    return(false);
                }
                break;

            default:
                if (memberDef != null && memberDef.IsTotal)
                {
                    if (m_createSnapshot)
                    {
                        m_generateDocMap = false;
                        return(true);
                    }
                    return(false);
                }
                break;
            }
            return(true);
        }
Example #10
0
 internal TablixHeader(Tablix owner, TablixMember tablixMember)
 {
     m_owner        = owner;
     m_tablixMember = tablixMember;
 }
Example #11
0
 internal ShimTablixMember(IDefinitionPath parentDefinitionPath, Tablix owner, TablixMember parent, int parentCollectionIndex, bool isColumn)
     : base(parentDefinitionPath, owner, parent, parentCollectionIndex)
 {
     m_isColumn = isColumn;
 }