private static void AddItem(Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem item, ref List <Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem> results) { if (results == null) { results = new List <Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem>(); } results.Add(item); }
internal ReportElement(IReportScope reportScope, IDefinitionPath parentDefinitionPath, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItemDef, RenderingContext renderingContext) { m_reportScope = reportScope; m_parentDefinitionPath = parentDefinitionPath; m_reportItemDef = reportItemDef; m_renderingContext = renderingContext; m_isOldSnapshot = false; }
internal ReportItemImpl(Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem itemDef, Microsoft.ReportingServices.RdlExpressions.ReportRuntime reportRT, IErrorContext iErrorContext) { Global.Tracer.Assert(itemDef != null, "(null != itemDef)"); Global.Tracer.Assert(reportRT != null, "(null != reportRT)"); Global.Tracer.Assert(iErrorContext != null, "(null != iErrorContext)"); m_item = itemDef; m_reportRT = reportRT; m_iErrorContext = iErrorContext; }
internal CellContents(IReportScope reportScope, IDefinitionPath ownerPath, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem cellReportItem, int rowSpan, int colSpan, RenderingContext renderingContext) { m_reportScope = reportScope; m_rowSpan = rowSpan; m_colSpan = colSpan; m_ownerPath = ownerPath; m_isOldSnapshot = false; m_cellReportItem = cellReportItem; m_renderingContext = renderingContext; }
private void CreateDataRegions(IReference <IScope> owner, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, bool onePass, ref DataActions dataAction) { RuntimeDataTablixObj runtimeDataTablixObj = null; switch (reportItem.ObjectType) { case Microsoft.ReportingServices.ReportProcessing.ObjectType.Rectangle: { Microsoft.ReportingServices.ReportIntermediateFormat.ReportItemCollection reportItems = ((Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem).ReportItems; if (reportItems != null && reportItems.ComputedReportItems != null) { CreateDataRegions(owner, reportItems.ComputedReportItems, odpContext, onePass, ref dataAction); } break; } case Microsoft.ReportingServices.ReportProcessing.ObjectType.Tablix: runtimeDataTablixObj = new RuntimeTablixObj(owner, (Microsoft.ReportingServices.ReportIntermediateFormat.Tablix)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.Chart: runtimeDataTablixObj = new RuntimeChartObj(owner, (Microsoft.ReportingServices.ReportIntermediateFormat.Chart)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.GaugePanel: runtimeDataTablixObj = new RuntimeGaugePanelObj(owner, (GaugePanel)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.MapDataRegion: runtimeDataTablixObj = new RuntimeMapDataRegionObj(owner, (MapDataRegion)reportItem, ref dataAction, odpContext, onePass); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.CustomReportItem: if (reportItem.IsDataRegion) { runtimeDataTablixObj = new RuntimeCriObj(owner, (Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem)reportItem, ref dataAction, odpContext, onePass); } break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.Map: { List <MapDataRegion> mapDataRegions = ((Map)reportItem).MapDataRegions; if (mapDataRegions != null) { CreateMapDataRegions(owner, mapDataRegions, odpContext, onePass, ref dataAction); } break; } } if (runtimeDataTablixObj != null) { AddDataRegion(runtimeDataTablixObj, (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem); } }
private void CreateDataRegions(IReference <IScope> owner, List <Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem> computedRIs, OnDemandProcessingContext odpContext, bool onePass, ref DataActions dataAction) { if (computedRIs != null) { for (int i = 0; i < computedRIs.Count; i++) { Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem = computedRIs[i]; CreateDataRegions(owner, reportItem, odpContext, onePass, ref dataAction); } } }
private bool LoadGeneratedReportItemDefinition() { if (!base.RenderingContext.OdpContext.OdpMetadata.ReportSnapshot.TryGetGeneratedReportItemChunkName(GetGeneratedDefinitionChunkKey(), out string name)) { return(false); } string mimeType; Stream chunk = base.RenderingContext.OdpContext.ChunkFactory.GetChunk(name, Microsoft.ReportingServices.ReportProcessing.ReportProcessing.ReportChunkTypes.GeneratedReportItems, ChunkMode.Open, out mimeType); if (chunk == null) { return(false); } using (chunk) { IntermediateFormatReader intermediateFormatReader = new IntermediateFormatReader(chunk, new ProcessingRIFObjectCreator((Microsoft.ReportingServices.ReportIntermediateFormat.IDOwner)m_reportItemDef.ParentInstancePath, m_reportItemDef.Parent)); Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem = (Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem)intermediateFormatReader.ReadRIFObject(); Global.Tracer.Assert(!intermediateFormatReader.HasReferences, "!reader.HasReferences"); reportItem.GlobalID = -CriDef.GlobalID; if (reportItem.StyleClass != null) { reportItem.StyleClass.InitializeForCRIGeneratedReportItem(); } reportItem.Visibility = m_reportItemDef.Visibility; Microsoft.ReportingServices.ReportProcessing.ObjectType objectType = reportItem.ObjectType; if (objectType == Microsoft.ReportingServices.ReportProcessing.ObjectType.Image) { Image image = new Image(ParentScope, base.ParentDefinitionPath, m_indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Image)reportItem, base.RenderingContext); image.CriOwner = this; image.CriGenerationPhase = CriGenerationPhases.None; m_generatedReportItem = image; } else { Global.Tracer.Assert(condition: false, "Unexpected CRI generated report item type: " + reportItem.ObjectType); } } return(true); }
public static void MergeDataProcessingItem(Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem item, ref List <Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem> results) { if (item == null) { return; } if (item.IsDataRegion) { AddItem(item, ref results); return; } switch (item.ObjectType) { case Microsoft.ReportingServices.ReportProcessing.ObjectType.Rectangle: MergeDataProcessingItems(((Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle)item).ReportItems.ComputedReportItems, ref results); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.Subreport: case Microsoft.ReportingServices.ReportProcessing.ObjectType.Map: AddItem(item, ref results); break; } }
private void CreateInstance(ScopeInstance parentInstance, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, IReference <IScope> owner) { if (reportItem == null) { return; } if (reportItem.IsDataRegion) { Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem; RuntimeDataRegionObjReference dataRegionObjRef = m_dataRegionObjs[dataRegion.IndexInCollection]; CreateDataRegionInstance(parentInstance, odpContext, dataRegionObjRef); return; } switch (reportItem.ObjectType) { case Microsoft.ReportingServices.ReportProcessing.ObjectType.Subreport: CreateSubReportInstance((Microsoft.ReportingServices.ReportIntermediateFormat.SubReport)reportItem, parentInstance, odpContext, owner); break; case Microsoft.ReportingServices.ReportProcessing.ObjectType.Rectangle: { Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem; CreateInstances(parentInstance, odpContext, owner, rectangle.ReportItems.ComputedReportItems); break; } case Microsoft.ReportingServices.ReportProcessing.ObjectType.Map: { List <MapDataRegion> mapDataRegions = ((Map)reportItem).MapDataRegions; for (int i = 0; i < mapDataRegions.Count; i++) { CreateInstance(parentInstance, mapDataRegions[i], odpContext, owner); } break; } } }
protected void DetailHandleSortFilterEvent(Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegionDef, IReference <IScope> outerScope, bool isColumnAxis, int rowIndex) { using (outerScope.PinValue()) { IScope scope = outerScope.Value(); List <IReference <RuntimeSortFilterEventInfo> > runtimeSortFilterInfo = m_odpContext.RuntimeSortFilterInfo; if (runtimeSortFilterInfo == null || dataRegionDef.SortFilterSourceDetailScopeInfo == null || scope.TargetForNonDetailSort) { return; } int count = runtimeSortFilterInfo.Count; for (int i = 0; i < count; i++) { IReference <RuntimeSortFilterEventInfo> reference = runtimeSortFilterInfo[i]; using (reference.PinValue()) { RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = reference.Value(); if (runtimeSortFilterEventInfo.EventSource.ContainingScopes == null || 0 >= runtimeSortFilterEventInfo.EventSource.ContainingScopes.Count || -1 == dataRegionDef.SortFilterSourceDetailScopeInfo[i] || !scope.TargetScopeMatched(i, detailSort: false) || m_odpContext.ReportObjectModel.FieldsImpl.GetRowIndex() != dataRegionDef.SortFilterSourceDetailScopeInfo[i]) { continue; } if (runtimeSortFilterEventInfo.EventSource.ContainingScopes.LastEntry == null) { Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem parent = runtimeSortFilterEventInfo.EventSource.Parent; if (runtimeSortFilterEventInfo.EventSource.IsSubReportTopLevelScope) { while (parent != null && !(parent is Microsoft.ReportingServices.ReportIntermediateFormat.SubReport)) { parent = parent.Parent; } Global.Tracer.Assert(parent is Microsoft.ReportingServices.ReportIntermediateFormat.SubReport, "(parent is SubReport)"); parent = parent.Parent; } if (parent == dataRegionDef) { runtimeSortFilterEventInfo.SetEventSourceScope(isColumnAxis, SelfReference, rowIndex); } } runtimeSortFilterEventInfo.AddDetailScopeInfo(isColumnAxis, SelfReference, rowIndex); } } } }
internal MapDataRegion(int id, ReportItem parent) : base(id, parent) { base.RowCount = 1; base.ColumnCount = 1; }
internal static ReportItem CreateItem(IReportScope reportScope, IDefinitionPath parentDefinitionPath, int indexIntoParentCollectionDef, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItemDef, RenderingContext renderingContext) { ReportItem reportItem = null; switch (reportItemDef.ObjectType) { case ObjectType.Textbox: reportItem = new TextBox(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.TextBox)reportItemDef, renderingContext); break; case ObjectType.Rectangle: reportItem = new Rectangle(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Rectangle)reportItemDef, renderingContext); break; case ObjectType.Image: reportItem = new Image(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Image)reportItemDef, renderingContext); break; case ObjectType.Line: reportItem = new Line(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Line)reportItemDef, renderingContext); break; case ObjectType.Subreport: reportItem = new SubReport(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.SubReport)reportItemDef, renderingContext); break; case ObjectType.Tablix: reportItem = new Tablix(parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Tablix)reportItemDef, renderingContext); break; case ObjectType.Chart: reportItem = new Chart(parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Chart)reportItemDef, renderingContext); break; case ObjectType.GaugePanel: reportItem = new GaugePanel(parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.GaugePanel)reportItemDef, renderingContext); break; case ObjectType.CustomReportItem: { Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem customReportItem = (Microsoft.ReportingServices.ReportIntermediateFormat.CustomReportItem)reportItemDef; reportItem = new CustomReportItem(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, customReportItem, renderingContext); if (!((CustomReportItem)reportItem).Initialize(renderingContext)) { reportItem = CreateItem(reportScope, parentDefinitionPath, customReportItem.AltReportItemIndexInParentCollectionDef, customReportItem.AltReportItem, renderingContext); reportItem.ReportItemDef.RepeatedSibling = customReportItem.RepeatedSibling; reportItem.ReportItemDef.RepeatWith = customReportItem.RepeatWith; ProcessAlternateCustomReportItem(customReportItem, reportItem, renderingContext); } break; } case ObjectType.Map: reportItem = new Map(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, (Microsoft.ReportingServices.ReportIntermediateFormat.Map)reportItemDef, renderingContext); break; } return(reportItem); }
internal ReportItem(IReportScope reportScope, IDefinitionPath parentDefinitionPath, int indexIntoParentCollectionDef, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItemDef, RenderingContext renderingContext) : base(reportScope, parentDefinitionPath, reportItemDef, renderingContext) { m_definitionPath = DefinitionPathConstants.GetCollectionDefinitionPath(parentDefinitionPath, indexIntoParentCollectionDef); m_reportItemDef.ROMScopeInstance = ReportScope.ReportScopeInstance; }
internal Rectangle(IReportScope reportScope, IDefinitionPath parentDefinitionPath, int indexIntoParentCollectionDef, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItemDef, RenderingContext renderingContext) : base(reportScope, parentDefinitionPath, indexIntoParentCollectionDef, reportItemDef, renderingContext) { }
internal void AddReportItemWithRepeatWithToUpdate(Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem) { m_reportItemsWithRepeatWithToUpdate.Add(reportItem); }
internal DataRegion(IDefinitionPath parentDefinitionPath, int indexIntoParentCollectionDef, Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItemDef, RenderingContext renderingContext) : base(null, parentDefinitionPath, indexIntoParentCollectionDef, reportItemDef, renderingContext) { }
internal bool PopulateRuntimeSortFilterEventInfo(OnDemandProcessingContext odpContext, Microsoft.ReportingServices.ReportIntermediateFormat.DataSet myDataSet) { if (odpContext.TopLevelContext.UserSortFilterInfo == null || odpContext.TopLevelContext.UserSortFilterInfo.OdpSortInfo == null || odpContext.TopLevelContext.OldSortFilterEventInfo == null) { return(false); } if (-1 != m_dataSetGlobalID) { return(false); } m_runtimeSortFilterInfo = null; EventInformation.OdpSortEventInfo odpSortInfo = odpContext.TopLevelContext.UserSortFilterInfo.OdpSortInfo; for (int i = 0; i < odpSortInfo.Count; i++) { string uniqueNameAt = odpSortInfo.GetUniqueNameAt(i); Microsoft.ReportingServices.ReportIntermediateFormat.SortFilterEventInfo sortFilterEventInfo = odpContext.TopLevelContext.OldSortFilterEventInfo[uniqueNameAt]; if (sortFilterEventInfo == null || sortFilterEventInfo.EventSource.UserSort == null) { continue; } int num = sortFilterEventInfo.EventSource.UserSort.SubReportDataSetGlobalId; if (-1 == num) { num = sortFilterEventInfo.EventSource.UserSort.DataSet.GlobalID; } if (num == myDataSet.GlobalID) { if (m_runtimeSortFilterInfo == null) { m_runtimeSortFilterInfo = new List <IReference <RuntimeSortFilterEventInfo> >(); } RuntimeSortFilterEventInfo runtimeSortFilterEventInfo = new RuntimeSortFilterEventInfo(sortFilterEventInfo.EventSource, uniqueNameAt, odpSortInfo.GetSortDirectionAt(i), sortFilterEventInfo.EventSourceScopeInfo, odpContext, (m_currentContainingScope == null) ? 1 : m_currentContainingScope.Value().Depth); runtimeSortFilterEventInfo.SelfReference.UnPinValue(); m_runtimeSortFilterInfo.Add(runtimeSortFilterEventInfo.SelfReference); } } if (m_runtimeSortFilterInfo != null) { int count = m_runtimeSortFilterInfo.Count; for (int j = 0; j < count; j++) { IReference <RuntimeSortFilterEventInfo> reference = m_runtimeSortFilterInfo[j]; using (reference.PinValue()) { RuntimeSortFilterEventInfo runtimeSortFilterEventInfo2 = reference.Value(); IInScopeEventSource eventSource = runtimeSortFilterEventInfo2.EventSource; Microsoft.ReportingServices.ReportIntermediateFormat.ISortFilterScope sortExpressionScope = eventSource.UserSort.SortExpressionScope; if (sortExpressionScope != null) { sortExpressionScope.IsSortFilterExpressionScope = SetSortFilterInfo(sortExpressionScope.IsSortFilterExpressionScope, count, j); } Microsoft.ReportingServices.ReportIntermediateFormat.ISortFilterScope sortTarget = eventSource.UserSort.SortTarget; if (sortTarget != null) { sortTarget.IsSortFilterTarget = SetSortFilterInfo(sortTarget.IsSortFilterTarget, count, j); } if (eventSource.ContainingScopes != null && 0 < eventSource.ContainingScopes.Count) { int num2 = 0; int num3 = 0; for (int k = 0; k < eventSource.ContainingScopes.Count; k++) { Microsoft.ReportingServices.ReportIntermediateFormat.Grouping grouping = eventSource.ContainingScopes[k]; if (grouping != null && grouping.IsDetail) { continue; } List <object> list = runtimeSortFilterEventInfo2.SortSourceScopeInfo[num2]; if (grouping != null) { if (grouping.SortFilterScopeInfo == null) { grouping.SortFilterScopeInfo = new List <object> [count]; for (int l = 0; l < count; l++) { grouping.SortFilterScopeInfo[l] = null; } grouping.SortFilterScopeIndex = new int[count]; for (int m = 0; m < count; m++) { grouping.SortFilterScopeIndex[m] = -1; } } grouping.SortFilterScopeInfo[j] = list; grouping.SortFilterScopeIndex[j] = num2; } else { List <Microsoft.ReportingServices.ReportIntermediateFormat.SubReport> detailScopeSubReports = eventSource.UserSort.DetailScopeSubReports; Microsoft.ReportingServices.ReportIntermediateFormat.ReportItem reportItem = (detailScopeSubReports == null || num3 >= detailScopeSubReports.Count) ? eventSource.Parent : detailScopeSubReports[num3++].Parent; while (reportItem != null && !reportItem.IsDataRegion) { reportItem = reportItem.Parent; } Global.Tracer.Assert(reportItem.IsDataRegion, "(parent.IsDataRegion)"); Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (Microsoft.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem; if (dataRegion.SortFilterSourceDetailScopeInfo == null) { dataRegion.SortFilterSourceDetailScopeInfo = new int[count]; for (int n = 0; n < count; n++) { dataRegion.SortFilterSourceDetailScopeInfo[n] = -1; } } Global.Tracer.Assert(list != null && 1 == list.Count, "(null != scopeValues && 1 == scopeValues.Count)"); dataRegion.SortFilterSourceDetailScopeInfo[j] = (int)list[0]; } num2++; } } Microsoft.ReportingServices.ReportIntermediateFormat.GroupingList groupsInSortTarget = eventSource.UserSort.GroupsInSortTarget; if (groupsInSortTarget != null) { for (int num4 = 0; num4 < groupsInSortTarget.Count; num4++) { groupsInSortTarget[num4].NeedScopeInfoForSortFilterExpression = SetSortFilterInfo(groupsInSortTarget[num4].NeedScopeInfoForSortFilterExpression, count, j); } } List <int> peerSortFilters = eventSource.GetPeerSortFilters(create: false); if (peerSortFilters == null || peerSortFilters.Count == 0) { continue; } if (runtimeSortFilterEventInfo2.PeerSortFilters == null) { runtimeSortFilterEventInfo2.PeerSortFilters = new Hashtable(); } for (int num5 = 0; num5 < peerSortFilters.Count; num5++) { if (eventSource.ID != peerSortFilters[num5]) { runtimeSortFilterEventInfo2.PeerSortFilters.Add(peerSortFilters[num5], null); } } } } } return(true); }
internal MapDataRegion(ReportItem parent) : base(parent) { }