Ejemplo n.º 1
0
        internal int AddRow(DataFieldRow row)
        {
            int count = m_rows.Count;

            m_rows.Add(row);
            return(count);
        }
 protected virtual bool ReadRowFromDataSet()
 {
     if (m_nextDataFieldRowToProcess != null)
     {
         m_nextDataFieldRowToProcess.SetFields(m_odpContext.ReportObjectModel.GetFieldsImplForUpdate(m_idcDataSet));
         m_nextDataFieldRowToProcess = null;
     }
     else
     {
         if (m_dataSource == null)
         {
             if (m_odpContext.QueryRestartInfo != null)
             {
                 SetupRelationshipQueryRestart();
             }
             m_dataSource = new RuntimeIdcIncrementalDataSource(m_idcDataSet, m_odpContext);
             m_dataSource.Initialize();
         }
         if (!m_dataSource.SetupNextRow())
         {
             return(false);
         }
     }
     return(true);
 }
 internal static void CommonFirstRow(OnDemandProcessingContext odpContext, ref bool firstRowIsAggregate, ref DataFieldRow firstRow)
 {
     if (firstRowIsAggregate || firstRow == null)
     {
         firstRow            = new DataFieldRow(odpContext.ReportObjectModel.FieldsImpl, getAndSave: true);
         firstRowIsAggregate = odpContext.ReportObjectModel.FieldsImpl.IsAggregateRow;
     }
 }
 protected void SetupFields(DataFieldRow dataRow)
 {
     if (dataRow == null)
     {
         m_odpContext.ReportObjectModel.CreateNoRows();
     }
     else
     {
         dataRow.SetFields(m_odpContext.ReportObjectModel.FieldsImpl);
     }
 }
Ejemplo n.º 5
0
 private void Traverse(DataFieldRow dataRow, ProcessingStages operation, DataRowSortOwnerTraversalContext context, IHierarchyObj owner)
 {
     dataRow.SetFields(owner.OdpContext.ReportObjectModel.FieldsImpl);
     if (operation == ProcessingStages.UserSortFilter)
     {
         owner.ReadRow();
     }
     else
     {
         context.SortOwner.PostDataRowSortNextRow();
     }
 }
        protected virtual void PushBackLastRow()
        {
            FieldsImpl fieldsImplForUpdate = m_odpContext.ReportObjectModel.GetFieldsImplForUpdate(m_idcDataSet);

            if (fieldsImplForUpdate.IsAggregateRow)
            {
                m_nextDataFieldRowToProcess = new AggregateRow(fieldsImplForUpdate, getAndSave: true);
            }
            else
            {
                m_nextDataFieldRowToProcess = new DataFieldRow(fieldsImplForUpdate, getAndSave: true);
            }
        }
Ejemplo n.º 7
0
        internal void NextRow(OnDemandProcessingContext odpContext, int depth)
        {
            DataFieldRow dataFieldRow = new DataFieldRow(odpContext.ReportObjectModel.FieldsImpl, getAndSave: true);

            if (m_firstRow == null)
            {
                m_firstRow = dataFieldRow;
                return;
            }
            if (m_dataRows == null)
            {
                m_dataRows = new ScalableList <DataFieldRow>(depth, odpContext.TablixProcessingScalabilityCache);
            }
            m_dataRows.Add(dataFieldRow);
        }
 protected void ScopeFinishSorting(ref DataFieldRow firstRow, RuntimeUserSortTargetInfo sortTargetInfo)
 {
     Global.Tracer.Assert(sortTargetInfo != null, "(null != sortTargetInfo)");
     firstRow = null;
     sortTargetInfo.SortTree.Traverse(ProcessingStages.UserSortFilter, ascending: true, null);
     sortTargetInfo.SortTree.Dispose();
     sortTargetInfo.SortTree = null;
     if (sortTargetInfo.AggregateRows != null)
     {
         for (int i = 0; i < sortTargetInfo.AggregateRows.Count; i++)
         {
             sortTargetInfo.AggregateRows[i].SetFields(m_odpContext.ReportObjectModel.FieldsImpl);
             SendToInner();
         }
         sortTargetInfo.AggregateRows = null;
     }
 }
Ejemplo n.º 9
0
        public void Deserialize(IntermediateFormatReader reader)
        {
            reader.RegisterDeclaration(m_declaration);
            while (reader.NextMember())
            {
                switch (reader.CurrentMember.MemberName)
                {
                case MemberName.FirstRow:
                    m_firstRow = (DataFieldRow)reader.ReadRIFObject();
                    break;

                case MemberName.DataRows:
                    m_dataRows = reader.ReadRIFObject <ScalableList <DataFieldRow> >();
                    break;

                default:
                    Global.Tracer.Assert(condition: false);
                    break;
                }
            }
        }
 public override void Deserialize(IntermediateFormatReader reader)
 {
     base.Deserialize(reader);
     reader.RegisterDeclaration(m_declaration);
     IScalabilityCache scalabilityCache = reader.PersistenceHelper as IScalabilityCache;
     while (reader.NextMember())
     {
         switch (reader.CurrentMember.MemberName)
         {
         case MemberName.DataRegionDef:
         {
             int id2 = reader.ReadInt32();
             m_dataRegionDef = (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)scalabilityCache.FetchStaticReference(id2);
             break;
         }
         case MemberName.OuterScope:
             m_outerScope = (IReference<IScope>)reader.ReadRIFObject();
             break;
         case MemberName.FirstRow:
             m_firstRow = (DataFieldRow)reader.ReadRIFObject();
             break;
         case MemberName.FirstRowIsAggregate:
             m_firstRowIsAggregate = reader.ReadBoolean();
             break;
         case MemberName.Filters:
         {
             int id = reader.ReadInt32();
             m_filters = (Filters)scalabilityCache.FetchStaticReference(id);
             break;
         }
         case MemberName.NonCustomAggregates:
             m_nonCustomAggregates = reader.ReadListOfRIFObjects<List<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>>();
             break;
         case MemberName.CustomAggregates:
             m_customAggregates = reader.ReadListOfRIFObjects<List<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>>();
             break;
         case MemberName.DataAction:
             m_dataAction = (DataActions)reader.ReadEnum();
             break;
         case MemberName.OuterDataAction:
             m_outerDataAction = (DataActions)reader.ReadEnum();
             break;
         case MemberName.RunningValues:
             m_runningValues = reader.ReadListOfPrimitives<string>();
             break;
         case MemberName.PreviousValues:
             m_previousValues = reader.ReadListOfPrimitives<string>();
             break;
         case MemberName.RunningValueValues:
             m_runningValueValues = reader.ReadArrayOfRIFObjects<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult>();
             break;
         case MemberName.RunningValueOfAggregateValues:
             m_runningValueOfAggregateValues = reader.ReadArrayOfRIFObjects<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObjResult>();
             break;
         case MemberName.PostSortAggregates:
             m_postSortAggregates = reader.ReadListOfRIFObjects<List<Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj>>();
             break;
         case MemberName.DataRows:
             m_dataRows = reader.ReadRIFObject<ScalableList<DataFieldRow>>();
             break;
         case MemberName.InnerDataAction:
             m_innerDataAction = (DataActions)reader.ReadEnum();
             break;
         case MemberName.UserSortTargetInfo:
             m_userSortTargetInfo = (RuntimeUserSortTargetInfo)reader.ReadRIFObject();
             break;
         case MemberName.SortFilterExpressionScopeInfoIndices:
             m_sortFilterExpressionScopeInfoIndices = reader.ReadInt32Array();
             break;
         case MemberName.InDataRowSortPhase:
             m_inDataRowSortPhase = reader.ReadBoolean();
             break;
         case MemberName.SortedDataRowTree:
             m_sortedDataRowTree = (BTree)reader.ReadRIFObject();
             break;
         case MemberName.DataRowSortExpression:
             m_dataRowSortExpression = (RuntimeExpressionInfo)reader.ReadRIFObject();
             break;
         case MemberName.AggregatesOfAggregates:
             m_aggregatesOfAggregates = (BucketedDataAggregateObjs)reader.ReadRIFObject();
             break;
         case MemberName.PostSortAggregatesOfAggregates:
             m_postSortAggregatesOfAggregates = (BucketedDataAggregateObjs)reader.ReadRIFObject();
             break;
         case MemberName.HasProcessedAggregateRow:
             m_hasProcessedAggregateRow = reader.ReadBoolean();
             break;
         default:
             Global.Tracer.Assert(condition: false);
             break;
         }
     }
 }
 protected void SetupEnvironment(List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj> nonCustomAggregates, List <Microsoft.ReportingServices.ReportIntermediateFormat.DataAggregateObj> customAggregates, DataFieldRow dataRow)
 {
     SetupAggregates(nonCustomAggregates);
     SetupAggregates(customAggregates);
     SetupFields(dataRow);
     m_odpContext.ReportRuntime.CurrentScope = this;
 }