private void CreateInstance(ScopeInstance parentInstance, AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem reportItem, OnDemandProcessingContext odpContext, IReference <IScope> owner)
        {
            if (reportItem != null)
            {
                if (reportItem.IsDataRegion)
                {
                    AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion dataRegion = (AspNetCore.ReportingServices.ReportIntermediateFormat.DataRegion)reportItem;
                    RuntimeDataRegionObjReference dataRegionObjRef = this.m_dataRegionObjs[dataRegion.IndexInCollection];
                    RuntimeRICollection.CreateDataRegionInstance(parentInstance, odpContext, dataRegionObjRef);
                }
                else
                {
                    switch (reportItem.ObjectType)
                    {
                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Subreport:
                        this.CreateSubReportInstance((AspNetCore.ReportingServices.ReportIntermediateFormat.SubReport)reportItem, parentInstance, odpContext, owner);
                        break;

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Rectangle:
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle)reportItem;
                        this.CreateInstances(parentInstance, odpContext, owner, rectangle.ReportItems.ComputedReportItems);
                        break;
                    }

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Map:
                    {
                        Map map = (Map)reportItem;
                        List <MapDataRegion> mapDataRegions = map.MapDataRegions;
                        for (int i = 0; i < mapDataRegions.Count; i++)
                        {
                            this.CreateInstance(parentInstance, mapDataRegions[i], odpContext, owner);
                        }
                        break;
                    }
                    }
                }
            }
        }
        public static void MergeDataProcessingItem(AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem item, ref List <AspNetCore.ReportingServices.ReportIntermediateFormat.ReportItem> results)
        {
            if (item != null)
            {
                if (item.IsDataRegion)
                {
                    RuntimeRICollection.AddItem(item, ref results);
                }
                else
                {
                    switch (item.ObjectType)
                    {
                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Rectangle:
                    {
                        AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle rectangle = (AspNetCore.ReportingServices.ReportIntermediateFormat.Rectangle)item;
                        RuntimeRICollection.MergeDataProcessingItems(rectangle.ReportItems.ComputedReportItems, ref results);
                        break;
                    }

                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Subreport:
                    case AspNetCore.ReportingServices.ReportProcessing.ObjectType.Map:
                        RuntimeRICollection.AddItem(item, ref results);
                        break;
                    }
                }
            }
        }