예제 #1
0
 internal void ResetReportVariables(OnDemandProcessingContext odpContext)
 {
     if (odpContext.ReportDefinition.Variables != null)
     {
         ScopeInstance.ResetVariables(odpContext, odpContext.ReportDefinition.Variables);
     }
 }
예제 #2
0
 internal void CalculateAndStoreReportVariables(OnDemandProcessingContext odpContext)
 {
     if (odpContext.ReportDefinition.Variables != null && m_variables == null)
     {
         ScopeInstance.CalculateVariables(odpContext, odpContext.ReportDefinition.Variables, out m_variables);
     }
 }
예제 #3
0
        internal static IReference <SubReportInstance> CreateInstance(ScopeInstance parentInstance, SubReport subReport, OnDemandMetadata odpMetadata)
        {
            SubReportInstance subReportInstance      = new SubReportInstance(subReport, odpMetadata);
            IReference <SubReportInstance> reference = odpMetadata.GroupTreeScalabilityCache.AllocateAndPin(subReportInstance, 0);

            subReportInstance.m_cleanupRef = (IDisposable)reference;
            parentInstance.AddChildScope((IReference <ScopeInstance>)reference, subReport.IndexInCollection);
            return(reference);
        }
        private static void TraceScopeInstance(ScopeInstance scopeInstance, int level)
        {
            Global.Tracer.Assert(scopeInstance != null, "(null != scopeInstance)");
            if (0 < scopeInstance.FirstRowOffset)
            {
                Global.Tracer.Trace("{0}FirstRowOffset={1}", GetEmptyString(level), scopeInstance.FirstRowOffset);
            }
            if (scopeInstance.AggregateValues != null && scopeInstance.AggregateValues.Count != 0)
            {
                StringBuilder stringBuilder = new StringBuilder(GetEmptyString(level));
                stringBuilder.Append("Aggregates=");
                foreach (DataAggregateObjResult aggregateValue in scopeInstance.AggregateValues)
                {
                    if (aggregateValue == null)
                    {
                        stringBuilder.Append("(NULL)");
                    }
                    else
                    {
                        stringBuilder.Append(aggregateValue.Value);
                    }
                    stringBuilder.Append("#");
                }
                Global.Tracer.Trace(stringBuilder.ToString());
            }
            if (scopeInstance.SubreportInstances != null && scopeInstance.SubreportInstances.Count != 0)
            {
                int count = scopeInstance.SubreportInstances.Count;
                Global.Tracer.Trace("{0}{1} SubReportInstances:", GetEmptyString(level), count);
                for (int i = 0; i < count; i++)
                {
                    if (scopeInstance.SubreportInstances[i] != null)
                    {
                        TraceSubReportInstance(scopeInstance.SubreportInstances[i].Value(), level + 1);
                    }
                }
            }
            if (scopeInstance.DataRegionInstances == null || scopeInstance.DataRegionInstances.Count == 0)
            {
                return;
            }
            int count2 = scopeInstance.DataRegionInstances.Count;

            Global.Tracer.Trace("{0}{1} DataRegionInstances:", GetEmptyString(level), count2);
            for (int j = 0; j < count2; j++)
            {
                if (scopeInstance.DataRegionInstances[j] != null)
                {
                    TraceDataRegionInstance(scopeInstance.DataRegionInstances[j].Value(), level + 1);
                }
            }
        }
        internal static IDisposable AddCellInstance(ScalableList <DataCellInstanceList> cells, int columnMemberSequenceId, int cellIndexInCollection, DataCellInstance cellInstance, IScalabilityCache cache)
        {
            ScopeInstance.AdjustLength(cells, columnMemberSequenceId);
            DataCellInstanceList item;
            IDisposable          andPin = cells.GetAndPin(columnMemberSequenceId, out item);

            if (item == null)
            {
                item = (cells[columnMemberSequenceId] = new DataCellInstanceList());
            }
            ListUtils.AdjustLength(item, cellIndexInCollection);
            item[cellIndexInCollection] = cellInstance;
            return(andPin);
        }
예제 #6
0
 internal void SetupEnvironment(OnDemandProcessingContext odpContext)
 {
     if (m_dataSetInstances == null)
     {
         InitDataSetInstances(odpContext);
     }
     for (int i = 0; i < m_dataSetInstances.Length; i++)
     {
         GetDataSetInstance(i, odpContext)?.SetupDataSetLevelAggregates(odpContext);
     }
     if (m_variables != null)
     {
         ScopeInstance.SetupVariables(odpContext, odpContext.ReportDefinition.Variables, m_variables);
     }
 }
        internal static IReference <DataRegionInstance> CreateInstance(ScopeInstance parentInstance, OnDemandMetadata odpMetadata, DataRegion dataRegionDef, int dataSetIndex)
        {
            DataRegionInstance              dataRegionInstance        = new DataRegionInstance(dataRegionDef, dataSetIndex);
            GroupTreeScalabilityCache       groupTreeScalabilityCache = odpMetadata.GroupTreeScalabilityCache;
            IReference <DataRegionInstance> reference;

            if (parentInstance.ObjectType == Microsoft.ReportingServices.ReportIntermediateFormat.Persistence.ObjectType.ReportInstance)
            {
                reference = ((ReportInstance)parentInstance).GetTopLevelDataRegionReference(dataRegionDef.IndexInCollection);
                groupTreeScalabilityCache.SetTreePartitionContentsAndPin(reference, dataRegionInstance);
            }
            else
            {
                reference = groupTreeScalabilityCache.AllocateAndPin(dataRegionInstance, 0);
                parentInstance.AddChildScope((IReference <ScopeInstance>)reference, dataRegionDef.IndexInCollection);
            }
            dataRegionInstance.m_cleanupRef = (IDisposable)reference;
            return(reference);
        }
        internal void SetupEnvironment(OnDemandProcessingContext odpContext, int dataSetIndex)
        {
            SetupFields(odpContext, dataSetIndex);
            int aggregateValueOffset = 0;

            SetupAggregates(odpContext, m_memberDef.Grouping.Aggregates, ref aggregateValueOffset);
            SetupAggregates(odpContext, m_memberDef.Grouping.RecursiveAggregates, ref aggregateValueOffset);
            SetupAggregates(odpContext, m_memberDef.Grouping.PostSortAggregates, ref aggregateValueOffset);
            SetupAggregates(odpContext, m_memberDef.RunningValues, ref aggregateValueOffset);
            if (m_memberDef.DataScopeInfo != null)
            {
                DataScopeInfo dataScopeInfo = m_memberDef.DataScopeInfo;
                SetupAggregates(odpContext, dataScopeInfo.AggregatesOfAggregates, ref aggregateValueOffset);
                SetupAggregates(odpContext, dataScopeInfo.PostSortAggregatesOfAggregates, ref aggregateValueOffset);
                SetupAggregates(odpContext, dataScopeInfo.RunningValuesOfAggregates, ref aggregateValueOffset);
            }
            if (m_variables != null)
            {
                ScopeInstance.SetupVariables(odpContext, m_memberDef.Grouping.Variables, m_variables);
            }
        }
 IList <DataRegionMemberInstance> IMemberHierarchy.GetChildMemberInstances(bool isRowMember, int memberIndexInCollection)
 {
     return(ScopeInstance.GetChildMemberInstances(m_children, memberIndexInCollection));
 }
 IList <DataRegionMemberInstance> IMemberHierarchy.GetChildMemberInstances(bool isRowMember, int memberIndexInCollection)
 {
     return(ScopeInstance.GetChildMemberInstances(isRowMember ? m_rowMembers : m_columnMembers, memberIndexInCollection));
 }