internal static bool NeedsDataForServerAggregate(IRIFReportDataScope reportDataScope) { IOnDemandScopeInstance onDemandScopeInstance = reportDataScope.CurrentStreamingScopeInstance.Value(); if (!onDemandScopeInstance.IsNoRows && onDemandScopeInstance.IsMostRecentlyCreatedScopeInstance) { return(onDemandScopeInstance.HasUnProcessedServerAggregate); } return(false); }
public void RegisterActiveParent(IReference <IOnDemandScopeInstance> parentScopeInstanceRef) { using (parentScopeInstanceRef.PinValue()) { IOnDemandScopeInstance onDemandScopeInstance = parentScopeInstanceRef.Value(); onDemandScopeInstance.SetupEnvironment(); this.m_lastPrimaryKeyValues = this.m_activeRelationship.EvaluateJoinConditionKeys(true, base.m_odpContext.ReportRuntime); this.UpdateActiveParent(parentScopeInstanceRef); } }
private void SetupEnvironment(IRIFReportDataScope reportDataScope, IOnDemandScopeInstance scopeInst, IReference <IOnDemandScopeInstance> scopeInstRef) { Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet = reportDataScope.DataScopeInfo.DataSet; if (m_odpContext.CurrentDataSetIndex != dataSet.IndexInCollection) { m_odpContext.SetupFieldsForNewDataSet(dataSet, m_odpContext.GetDataSetInstance(dataSet), addRowIndex: true, noRows: false); } scopeInst.SetupEnvironment(); m_lastOnDemandScopeInstance = scopeInstRef; m_lastRIFObject = reportDataScope; }
private void SetupEnvironment(IRIFReportDataScope reportDataScope, IOnDemandScopeInstance scopeInst, IReference <IOnDemandScopeInstance> scopeInstRef) { AspNetCore.ReportingServices.ReportIntermediateFormat.DataSet dataSet = reportDataScope.DataScopeInfo.DataSet; if (base.m_odpContext.CurrentDataSetIndex != dataSet.IndexInCollection) { base.m_odpContext.SetupFieldsForNewDataSet(dataSet, base.m_odpContext.GetDataSetInstance(dataSet), true, false); } scopeInst.SetupEnvironment(); this.m_lastOnDemandScopeInstance = scopeInstRef; this.m_lastRIFObject = reportDataScope; }
private bool RequiresIdcProcessing(IRIFReportDataScope reportDataScope, IReference <IOnDemandScopeInstance> scopeInstanceRef, IReference <IOnDemandScopeInstance> parentScopeInstanceRef) { if (reportDataScope.DataScopeInfo.NeedsIDC) { if (scopeInstanceRef == null) { RegisterParentForIdc(reportDataScope, parentScopeInstanceRef); return(TryProcessToNextScopeInstance(reportDataScope)); } IOnDemandScopeInstance onDemandScopeInstance = scopeInstanceRef.Value(); if (onDemandScopeInstance.IsNoRows && onDemandScopeInstance.IsMostRecentlyCreatedScopeInstance) { RegisterParentForIdc(reportDataScope, parentScopeInstanceRef); return(ProcessOneRow(reportDataScope)); } } return(false); }
private void BindScopeToInstance(IRIFReportDataScope reportDataScope) { if (reportDataScope.IsBoundToStreamingScopeInstance) { return; } if (!reportDataScope.IsScope) { IRIFReportDataScope parentReportScope = reportDataScope.ParentReportScope; EnsureScopeIsBound(parentReportScope); reportDataScope.BindToStreamingScopeInstance(parentReportScope.CurrentStreamingScopeInstance); return; } switch (reportDataScope.InstancePathItem.Type) { case InstancePathItemType.Cell: if (reportDataScope.IsDataIntersectionScope) { IRIFReportIntersectionScope iRIFReportIntersectionScope = (IRIFReportIntersectionScope)reportDataScope; IRIFReportDataScope parentRowReportScope = iRIFReportIntersectionScope.ParentRowReportScope; if (!TryBindParentScope(reportDataScope, parentRowReportScope, out IReference <IOnDemandMemberInstance> parentScopeInst2)) { break; } IRIFReportDataScope parentColumnReportScope = iRIFReportIntersectionScope.ParentColumnReportScope; if (!TryBindParentScope(reportDataScope, parentColumnReportScope, out IReference <IOnDemandMemberInstance> parentScopeInst3)) { break; } IReference <IOnDemandMemberInstance> reference; IReference <IOnDemandMemberInstance> reference2; if (!iRIFReportIntersectionScope.IsColumnOuterGrouping) { reference = parentScopeInst2; reference2 = parentScopeInst3; } else { reference = parentScopeInst3; reference2 = parentScopeInst2; } CheckForPrematureScopeInstance(reportDataScope); IReference <IOnDemandScopeInstance> cellRef; IOnDemandScopeInstance cellInstance = SyntheticTriangulatedCellReference.GetCellInstance(reference, reference2, out cellRef); if (cellInstance == null && iRIFReportIntersectionScope.DataScopeInfo.NeedsIDC && TryProcessToCreateCell(iRIFReportIntersectionScope, (RuntimeDataTablixGroupLeafObjReference)reference2, (RuntimeDataTablixGroupLeafObjReference)reference)) { cellInstance = SyntheticTriangulatedCellReference.GetCellInstance(reference, reference2, out cellRef); } if (cellInstance != null) { if (cellRef == null) { iRIFReportIntersectionScope.BindToStreamingScopeInstance(reference, reference2); SetupEnvironment(reportDataScope, cellInstance, iRIFReportIntersectionScope.CurrentStreamingScopeInstance); } else { reportDataScope.BindToStreamingScopeInstance(cellRef); } } } else { Global.Tracer.Assert(condition: false, "Non-intersection cell scopes are not yet supported by streaming ODP."); } break; case InstancePathItemType.ColumnMemberInstanceIndexTopMost: case InstancePathItemType.ColumnMemberInstanceIndex: case InstancePathItemType.RowMemberInstanceIndex: { IRIFReportDataScope parentReportScope3 = reportDataScope.ParentReportScope; if (!TryBindParentScope(reportDataScope, parentReportScope3, out IReference <IOnDemandMemberOwnerInstance> parentScopeInst4)) { break; } CheckForPrematureScopeInstance(reportDataScope); using (parentScopeInst4.PinValue()) { IOnDemandMemberOwnerInstance onDemandMemberOwnerInstance = parentScopeInst4.Value(); Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode rifMember = (Microsoft.ReportingServices.ReportIntermediateFormat.ReportHierarchyNode)reportDataScope; IOnDemandMemberInstanceReference firstMemberInstance = onDemandMemberOwnerInstance.GetFirstMemberInstance(rifMember); if (RequiresIdcProcessing(reportDataScope, firstMemberInstance, (IReference <IOnDemandScopeInstance>)parentScopeInst4)) { firstMemberInstance = onDemandMemberOwnerInstance.GetFirstMemberInstance(rifMember); } reportDataScope.BindToStreamingScopeInstance(firstMemberInstance); } break; } case InstancePathItemType.DataRegion: { IRIFReportDataScope parentReportScope2 = reportDataScope.ParentReportScope; Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)reportDataScope; if (parentReportScope2 == null) { Microsoft.ReportingServices.ReportIntermediateFormat.DataSet dataSet = dataRegion.DataScopeInfo.DataSet; DataPipelineManager orCreatePipelineManager = GetOrCreatePipelineManager(dataSet, dataRegion); reportDataScope.BindToStreamingScopeInstance(orCreatePipelineManager.GroupTreeRoot.GetDataRegionInstance(dataRegion)); } else { if (!TryBindParentScope(reportDataScope, parentReportScope2, out IReference <IOnDemandScopeInstance> parentScopeInst)) { break; } CheckForPrematureScopeInstance(reportDataScope); using (parentScopeInst.PinValue()) { IOnDemandScopeInstance onDemandScopeInstance = parentScopeInst.Value(); IReference <IOnDemandScopeInstance> dataRegionInstance = onDemandScopeInstance.GetDataRegionInstance(dataRegion); if (RequiresIdcProcessing(reportDataScope, dataRegionInstance, parentScopeInst)) { dataRegionInstance = onDemandScopeInstance.GetDataRegionInstance(dataRegion); } reportDataScope.BindToStreamingScopeInstance(dataRegionInstance); } } break; } default: Global.Tracer.Assert(false, "SetupObjectModels cannot handle IRIFReportDataScope of type: {0}", Enum.GetName(typeof(InstancePathItemType), reportDataScope.InstancePathItem.Type)); break; } }