internal ShimDataMember(IDefinitionPath parentDefinitionPath, CustomReportItem owner, ShimDataMember parent, int parentCollectionIndex, bool isColumn, bool isStatic, Microsoft.ReportingServices.ReportRendering.DataMemberCollection renderMembers, int staticIndex)
            : base(parentDefinitionPath, owner, parent, parentCollectionIndex)
        {
            m_definitionStartIndex = owner.GetCurrentMemberCellDefinitionIndex();
            m_isColumn             = isColumn;
            m_isStatic             = isStatic;
            m_renderMembers        = renderMembers;
            m_staticIndex          = staticIndex;
            DataGroupingCollection children;

            if (isStatic)
            {
                children = renderMembers[staticIndex].Children;
            }
            else
            {
                m_group  = new Group(owner, new ShimRenderGroups(renderMembers));
                children = renderMembers[0].Children;
            }
            if (children != null)
            {
                m_children = new ShimDataMemberCollection(this, owner, isColumn, this, children);
            }
            else
            {
                owner.GetAndIncrementMemberCellDefinitionIndex();
            }
            m_definitionEndIndex = owner.GetCurrentMemberCellDefinitionIndex();
        }
 internal void ResetContext(Microsoft.ReportingServices.ReportRendering.DataMemberCollection renderMembers)
 {
     if (renderMembers != null)
     {
         m_renderMembers = renderMembers;
     }
     if (m_group != null)
     {
         m_group.CurrentRenderGroupIndex = -1;
     }
     Microsoft.ReportingServices.ReportRendering.DataMember currentRenderMember = IsStatic ? m_renderMembers[m_staticIndex] : (m_group.CurrentShimRenderGroup as Microsoft.ReportingServices.ReportRendering.DataMember);
     UpdateInnerContext(currentRenderMember);
 }
 public DataMemberCollection this[int index]
 {
     get
     {
         if (index < 0 || index >= Count)
         {
             throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, index, 0, Count);
         }
         DataMemberCollection dataMemberCollection = null;
         if (index == 0)
         {
             dataMemberCollection = m_firstCollection;
         }
         else if (m_collections != null)
         {
             dataMemberCollection = m_collections[index - 1];
         }
         if (dataMemberCollection == null)
         {
             bool headingDefIsStaticSubtotal = index > 0 && m_headingDef[index].Static && !m_headingDef[index].Subtotal && m_headingDef[index - 1].Subtotal;
             CustomReportItemHeadingInstanceList customReportItemHeadingInstanceList = null;
             if (m_headingDef[index].Static && m_headingInstances != null && m_headingInstances.Count > index)
             {
                 customReportItemHeadingInstanceList = new CustomReportItemHeadingInstanceList(1);
                 customReportItemHeadingInstanceList.Add(m_headingInstances[index]);
             }
             else
             {
                 customReportItemHeadingInstanceList = m_headingInstances;
             }
             dataMemberCollection = new DataMemberCollection(m_owner, m_parent, m_headingDef[index], headingDefIsStaticSubtotal, customReportItemHeadingInstanceList);
             if (m_owner.UseCache)
             {
                 if (index == 0)
                 {
                     m_firstCollection = dataMemberCollection;
                 }
                 else
                 {
                     if (m_collections == null)
                     {
                         m_collections = new DataMemberCollection[Count - 1];
                     }
                     m_collections[index - 1] = dataMemberCollection;
                 }
             }
         }
         return(dataMemberCollection);
     }
 }
Beispiel #4
0
 internal ShimRenderGroups(Microsoft.ReportingServices.ReportRendering.DataMemberCollection renderGroups)
 {
     m_type = DataRegion.Type.CustomReportItem;
     m_renderDataMembers = renderGroups;
 }