コード例 #1
0
 public void Add(GroupingList scopeDefs, VariantList[] scopeValues, int value)
 {
     if (scopeValues == null || scopeValues.Length == 0)
     {
         Global.Tracer.Assert(scopeDefs == null || 0 == scopeDefs.Count, "(null == scopeDefs || 0 == scopeDefs.Count)");
         this.m_lookupTable = value;
     }
     else
     {
         bool flag = true;
         if (this.m_lookupTable == null)
         {
             this.m_lookupTable = new Hashtable();
             flag = false;
         }
         Hashtable hashtable = (Hashtable)this.m_lookupTable;
         int       num       = 0;
         int       num2      = 0;
         for (int i = 0; i < scopeValues.Length; i++)
         {
             VariantList variantList = scopeValues[i];
             if (variantList == null)
             {
                 num2++;
             }
             else
             {
                 num = variantList.Count;
                 if (i == scopeValues.Length - 1)
                 {
                     num--;
                 }
                 this.GetNullScopeEntries(num2, ref hashtable, ref flag);
                 for (int j = 0; j < num; j++)
                 {
                     Hashtable hashtable2 = (!flag) ? null : ((Hashtable)hashtable[((ArrayList)variantList)[j]]);
                     if (hashtable2 == null)
                     {
                         hashtable2 = new Hashtable();
                         hashtable.Add(((ArrayList)variantList)[j], hashtable2);
                         flag = false;
                     }
                     hashtable = hashtable2;
                 }
                 num2 = 0;
             }
         }
         object key = 1;
         if (scopeValues[scopeValues.Length - 1] != null)
         {
             key = ((ArrayList)scopeValues[scopeValues.Length - 1])[num];
         }
         else
         {
             this.GetNullScopeEntries(num2, ref hashtable, ref flag);
         }
         Global.Tracer.Assert(!hashtable.Contains(key), "(!hashEntries.Contains(lastKey))");
         hashtable.Add(key, value);
     }
 }
コード例 #2
0
 public CustomReportItemHeadingInstance(ReportProcessing.ProcessingContext pc, int headingCellIndex, CustomReportItemHeading headingDef, VariantList groupExpressionValues, int recursiveLevel)
 {
     if (headingDef.InnerHeadings != null)
     {
         this.m_subHeadingInstances = new CustomReportItemHeadingInstanceList();
     }
     this.m_headingDef       = headingDef;
     this.m_headingCellIndex = headingCellIndex;
     if (groupExpressionValues != null)
     {
         this.m_groupExpressionValues = new VariantList(groupExpressionValues.Count);
         for (int i = 0; i < groupExpressionValues.Count; i++)
         {
             if (((ArrayList)groupExpressionValues)[i] == null || DBNull.Value == ((ArrayList)groupExpressionValues)[i])
             {
                 this.m_groupExpressionValues.Add(null);
             }
             else
             {
                 this.m_groupExpressionValues.Add(((ArrayList)groupExpressionValues)[i]);
             }
         }
     }
     if (headingDef.Grouping != null && headingDef.Grouping.GroupLabel != null)
     {
         this.m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(headingDef.Grouping, headingDef.DataRegionDef.ObjectType, headingDef.DataRegionDef.Name));
     }
     if (headingDef.CustomProperties != null)
     {
         this.m_customPropertyInstances = headingDef.CustomProperties.EvaluateExpressions(headingDef.DataRegionDef.ObjectType, headingDef.DataRegionDef.Name, "DataGrouping.", pc);
     }
     this.m_recursiveLevel = recursiveLevel;
 }
コード例 #3
0
 public void PopulateFieldPropertyValues(StringList propertyNames)
 {
     if (propertyNames != null)
     {
         int count = propertyNames.Count;
         this.m_fieldPropertyValues = new VariantList(count);
         for (int i = 0; i < count; i++)
         {
             object value = null;
             if (this.m_properties != null)
             {
                 value = this.m_properties[propertyNames[i]];
             }
             this.m_fieldPropertyValues.Add(value);
         }
     }
 }
コード例 #4
0
        public int Lookup(GroupingList scopeDefs, VariantList[] scopeValues)
        {
            object obj = null;

            if (scopeValues == null || scopeValues.Length == 0)
            {
                Global.Tracer.Assert(scopeDefs == null || 0 == scopeDefs.Count, "(null == scopeDefs || 0 == scopeDefs.Count)");
                obj = this.m_lookupTable;
            }
            else
            {
                Hashtable hashtable = (Hashtable)this.m_lookupTable;
                int       num       = 0;
                for (int i = 0; i < scopeValues.Length; i++)
                {
                    VariantList variantList = scopeValues[i];
                    if (variantList == null)
                    {
                        num++;
                    }
                    else
                    {
                        hashtable = (Hashtable)hashtable[num];
                        for (int j = 0; j < variantList.Count; j++)
                        {
                            obj = hashtable[((ArrayList)variantList)[j]];
                            if (i < scopeValues.Length - 1 || j < variantList.Count - 1)
                            {
                                hashtable = (Hashtable)obj;
                                Global.Tracer.Assert(null != hashtable, "(null != hashEntries)");
                            }
                        }
                        num = 0;
                    }
                }
                if (scopeValues[scopeValues.Length - 1] == null)
                {
                    hashtable = (Hashtable)hashtable[num];
                    obj       = hashtable[1];
                }
            }
            Global.Tracer.Assert(obj is int);
            return((int)obj);
        }
コード例 #5
0
        public void RegisterSortFilterExpressionScope(ReportProcessing.IScope container, ReportProcessing.RuntimeDataRegionObj scopeObj, bool[] isSortFilterExpressionScope)
        {
            RuntimeSortFilterEventInfoList runtimeSortFilterInfo = this.m_runtimeSortFilterInfo;

            if (runtimeSortFilterInfo != null && isSortFilterExpressionScope != null && scopeObj != null)
            {
                VariantList[] array = null;
                for (int i = 0; i < runtimeSortFilterInfo.Count; i++)
                {
                    if (isSortFilterExpressionScope[i] && scopeObj.IsTargetForSort(i, false) && scopeObj.TargetScopeMatched(i, false))
                    {
                        if (array == null && runtimeSortFilterInfo[i].EventSource.UserSort.GroupsInSortTarget != null)
                        {
                            int num = 0;
                            array = new VariantList[runtimeSortFilterInfo[i].EventSource.UserSort.GroupsInSortTarget.Count];
                            scopeObj.GetScopeValues(runtimeSortFilterInfo[i].EventTarget, array, ref num);
                        }
                        runtimeSortFilterInfo[i].RegisterSortFilterExpressionScope(ref container.SortFilterExpressionScopeInfoIndices[i], scopeObj, array, i);
                    }
                }
            }
        }
コード例 #6
0
        public MatrixHeadingInstanceInfo(ReportProcessing.ProcessingContext pc, int headingCellIndex, MatrixHeading matrixHeadingDef, MatrixHeadingInstance owner, bool isSubtotal, int reportItemDefIndex, VariantList groupExpressionValues, out NonComputedUniqueNames nonComputedUniqueNames)
        {
            ReportItemCollection reportItems;

            if (isSubtotal)
            {
                reportItems = matrixHeadingDef.Subtotal.ReportItems;
            }
            else
            {
                reportItems = matrixHeadingDef.ReportItems;
                if (matrixHeadingDef.OwcGroupExpression)
                {
                    if (groupExpressionValues == null || DBNull.Value == ((ArrayList)groupExpressionValues)[0])
                    {
                        this.m_groupExpressionValue = null;
                    }
                    else
                    {
                        this.m_groupExpressionValue = ((ArrayList)groupExpressionValues)[0];
                    }
                }
            }
            if (0 < reportItems.Count && !reportItems.IsReportItemComputed(reportItemDefIndex))
            {
                this.m_contentUniqueNames = NonComputedUniqueNames.CreateNonComputedUniqueNames(pc, reportItems[reportItemDefIndex]);
            }
            nonComputedUniqueNames  = this.m_contentUniqueNames;
            this.m_headingCellIndex = headingCellIndex;
            if (!isSubtotal && pc.ShowHideType != 0)
            {
                this.m_startHidden = pc.ProcessReceiver(owner.UniqueName, matrixHeadingDef.Visibility, matrixHeadingDef.ExprHost, matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name);
            }
            if (matrixHeadingDef.Grouping != null && matrixHeadingDef.Grouping.GroupLabel != null)
            {
                this.m_label = pc.NavigationInfo.RegisterLabel(pc.ReportRuntime.EvaluateGroupingLabelExpression(matrixHeadingDef.Grouping, matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name));
            }
            if (matrixHeadingDef.Grouping != null && matrixHeadingDef.Grouping.CustomProperties != null)
            {
                this.m_customPropertyInstances = matrixHeadingDef.Grouping.CustomProperties.EvaluateExpressions(matrixHeadingDef.DataRegionDef.ObjectType, matrixHeadingDef.DataRegionDef.Name, matrixHeadingDef.Grouping.Name + ".", pc);
            }
            matrixHeadingDef.StartHidden = this.m_startHidden;
        }
コード例 #7
0
 public MatrixHeadingInstance(ReportProcessing.ProcessingContext pc, int headingCellIndex, MatrixHeading matrixHeadingDef, bool isSubtotal, int reportItemDefIndex, VariantList groupExpressionValues, out NonComputedUniqueNames nonComputedUniqueNames)
 {
     this.m_uniqueName = pc.CreateUniqueName();
     if (isSubtotal && matrixHeadingDef.Subtotal.StyleClass != null)
     {
         base.m_instanceInfo = new MatrixSubtotalHeadingInstanceInfo(pc, headingCellIndex, matrixHeadingDef, this, isSubtotal, reportItemDefIndex, groupExpressionValues, out nonComputedUniqueNames);
         if (matrixHeadingDef.GetInnerStaticHeading() != null)
         {
             this.m_subHeadingInstances = new MatrixHeadingInstanceList();
         }
     }
     else
     {
         base.m_instanceInfo = new MatrixHeadingInstanceInfo(pc, headingCellIndex, matrixHeadingDef, this, isSubtotal, reportItemDefIndex, groupExpressionValues, out nonComputedUniqueNames);
         if (matrixHeadingDef.SubHeading != null)
         {
             this.m_subHeadingInstances = new MatrixHeadingInstanceList();
         }
     }
     this.m_renderingPages   = new RenderingPagesRangesList();
     this.m_matrixHeadingDef = matrixHeadingDef;
     this.m_isSubtotal       = isSubtotal;
     this.m_headingDefIndex  = reportItemDefIndex;
     if (!matrixHeadingDef.IsColumn)
     {
         pc.Pagination.EnterIgnoreHeight(matrixHeadingDef.StartHidden);
     }
     if (matrixHeadingDef.FirstHeadingInstances == null)
     {
         int count = matrixHeadingDef.ReportItems.Count;
         matrixHeadingDef.FirstHeadingInstances = new BoolList(count);
         for (int i = 0; i < count; i++)
         {
             matrixHeadingDef.FirstHeadingInstances.Add(true);
         }
     }
 }
コード例 #8
0
 public ChartHeadingInstance(ReportProcessing.ProcessingContext pc, int headingCellIndex, ChartHeading chartHeadingDef, int labelIndex, VariantList groupExpressionValues)
 {
     this.m_uniqueName = pc.CreateUniqueName();
     if (chartHeadingDef.SubHeading != null)
     {
         this.m_subHeadingInstances = new ChartHeadingInstanceList();
     }
     base.m_instanceInfo    = new ChartHeadingInstanceInfo(pc, headingCellIndex, chartHeadingDef, labelIndex, groupExpressionValues);
     this.m_chartHeadingDef = chartHeadingDef;
 }
コード例 #9
0
 public ChartHeadingInstanceInfo(ReportProcessing.ProcessingContext pc, int headingCellIndex, ChartHeading chartHeadingDef, int labelIndex, VariantList groupExpressionValues)
 {
     this.m_headingCellIndex = headingCellIndex;
     if (chartHeadingDef.ChartGroupExpression)
     {
         if (groupExpressionValues == null || DBNull.Value == ((ArrayList)groupExpressionValues)[0])
         {
             this.m_groupExpressionValue = null;
         }
         else
         {
             this.m_groupExpressionValue = ((ArrayList)groupExpressionValues)[0];
         }
     }
     if (chartHeadingDef.Labels != null)
     {
         ExpressionInfo expressionInfo = chartHeadingDef.Labels[labelIndex];
         if (expressionInfo != null)
         {
             if (chartHeadingDef.Grouping != null)
             {
                 this.m_headingLabel = pc.ReportRuntime.EvaluateChartDynamicHeadingLabelExpression(chartHeadingDef, expressionInfo, chartHeadingDef.DataRegionDef.Name);
             }
             else
             {
                 this.m_headingLabel = pc.ReportRuntime.EvaluateChartStaticHeadingLabelExpression(chartHeadingDef, expressionInfo, chartHeadingDef.DataRegionDef.Name);
             }
         }
     }
     if (chartHeadingDef.Grouping == null)
     {
         this.m_staticGroupingIndex = labelIndex;
     }
     else if (chartHeadingDef.Grouping.CustomProperties != null)
     {
         this.m_customPropertyInstances = chartHeadingDef.Grouping.CustomProperties.EvaluateExpressions(chartHeadingDef.DataRegionDef.ObjectType, chartHeadingDef.DataRegionDef.Name, chartHeadingDef.Grouping.Name + ".", pc);
     }
 }
 public MatrixSubtotalHeadingInstanceInfo(ReportProcessing.ProcessingContext pc, int headingCellIndex, MatrixHeading matrixHeadingDef, MatrixHeadingInstance owner, bool isSubtotal, int reportItemDefIndex, VariantList groupExpressionValues, out NonComputedUniqueNames nonComputedUniqueNames)
     : base(pc, headingCellIndex, matrixHeadingDef, owner, isSubtotal, reportItemDefIndex, groupExpressionValues, out nonComputedUniqueNames)
 {
     Global.Tracer.Assert(isSubtotal);
     Global.Tracer.Assert(null != matrixHeadingDef.Subtotal);
     Global.Tracer.Assert(null != matrixHeadingDef.Subtotal.StyleClass);
     if (matrixHeadingDef.Subtotal.StyleClass.ExpressionList != null)
     {
         this.m_styleAttributeValues = new object[matrixHeadingDef.Subtotal.StyleClass.ExpressionList.Count];
         ReportProcessing.RuntimeRICollection.EvaluateStyleAttributes(ObjectType.Subtotal, matrixHeadingDef.Grouping.Name, matrixHeadingDef.Subtotal.StyleClass, owner.UniqueName, this.m_styleAttributeValues, pc);
     }
 }
コード例 #11
0
 public bool PopulateRuntimeSortFilterEventInfo(ReportProcessing.ProcessingContext pc, DataSet myDataSet)
 {
     if (pc.UserSortFilterInfo != null && pc.UserSortFilterInfo.SortInfo != null && pc.OldSortFilterEventInfo != null)
     {
         if (this.m_dataSetID != -1)
         {
             return(false);
         }
         this.m_runtimeSortFilterInfo = null;
         EventInformation.SortEventInfo sortInfo = pc.UserSortFilterInfo.SortInfo;
         for (int i = 0; i < sortInfo.Count; i++)
         {
             int uniqueNameAt = sortInfo.GetUniqueNameAt(i);
             SortFilterEventInfo sortFilterEventInfo = pc.OldSortFilterEventInfo[uniqueNameAt];
             if (sortFilterEventInfo != null && sortFilterEventInfo.EventSource.UserSort != null && sortFilterEventInfo.EventSource.UserSort.DataSetID == myDataSet.ID)
             {
                 if (this.m_runtimeSortFilterInfo == null)
                 {
                     this.m_runtimeSortFilterInfo = new RuntimeSortFilterEventInfoList();
                 }
                 this.m_runtimeSortFilterInfo.Add(new RuntimeSortFilterEventInfo(sortFilterEventInfo.EventSource, uniqueNameAt, sortInfo.GetSortDirectionAt(i), sortFilterEventInfo.EventSourceScopeInfo));
             }
         }
         if (this.m_runtimeSortFilterInfo != null)
         {
             int count = this.m_runtimeSortFilterInfo.Count;
             for (int j = 0; j < count; j++)
             {
                 TextBox          eventSource         = this.m_runtimeSortFilterInfo[j].EventSource;
                 ISortFilterScope sortExpressionScope = eventSource.UserSort.SortExpressionScope;
                 if (sortExpressionScope != null)
                 {
                     sortExpressionScope.IsSortFilterExpressionScope = this.SetSortFilterInfo(sortExpressionScope.IsSortFilterExpressionScope, count, j);
                 }
                 ISortFilterScope sortTarget = eventSource.UserSort.SortTarget;
                 if (sortTarget != null)
                 {
                     sortTarget.IsSortFilterTarget = this.SetSortFilterInfo(sortTarget.IsSortFilterTarget, count, j);
                 }
                 if (eventSource.ContainingScopes != null && 0 < eventSource.ContainingScopes.Count)
                 {
                     int num = 0;
                     for (int k = 0; k < eventSource.ContainingScopes.Count; k++)
                     {
                         Grouping    grouping    = eventSource.ContainingScopes[k];
                         VariantList variantList = this.m_runtimeSortFilterInfo[j].SortSourceScopeInfo[k];
                         if (grouping != null)
                         {
                             if (grouping.SortFilterScopeInfo == null)
                             {
                                 grouping.SortFilterScopeInfo = new VariantList[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]  = variantList;
                             grouping.SortFilterScopeIndex[j] = k;
                         }
                         else
                         {
                             SubReportList detailScopeSubReports = eventSource.UserSort.DetailScopeSubReports;
                             ReportItem    parent;
                             if (detailScopeSubReports != null && num < detailScopeSubReports.Count)
                             {
                                 parent = detailScopeSubReports[num++].Parent;
                             }
                             else
                             {
                                 Global.Tracer.Assert(k == eventSource.ContainingScopes.Count - 1, "(j == eventSource.ContainingScopes.Count - 1)");
                                 parent = eventSource.Parent;
                             }
                             while (parent != null && !(parent is DataRegion))
                             {
                                 parent = parent.Parent;
                             }
                             Global.Tracer.Assert(parent is DataRegion, "(parent is DataRegion)");
                             DataRegion dataRegion = (DataRegion)parent;
                             if (dataRegion.SortFilterSourceDetailScopeInfo == null)
                             {
                                 dataRegion.SortFilterSourceDetailScopeInfo = new int[count];
                                 for (int n = 0; n < count; n++)
                                 {
                                     dataRegion.SortFilterSourceDetailScopeInfo[n] = -1;
                                 }
                             }
                             Global.Tracer.Assert(variantList != null && 1 == variantList.Count, "(null != scopeValues && 1 == scopeValues.Count)");
                             dataRegion.SortFilterSourceDetailScopeInfo[j] = (int)((ArrayList)variantList)[0];
                         }
                     }
                 }
                 GroupingList groupsInSortTarget = eventSource.UserSort.GroupsInSortTarget;
                 if (groupsInSortTarget != null)
                 {
                     for (int num3 = 0; num3 < groupsInSortTarget.Count; num3++)
                     {
                         groupsInSortTarget[num3].NeedScopeInfoForSortFilterExpression = this.SetSortFilterInfo(groupsInSortTarget[num3].NeedScopeInfoForSortFilterExpression, count, j);
                     }
                 }
                 IntList peerSortFilters = eventSource.GetPeerSortFilters(false);
                 if (peerSortFilters != null)
                 {
                     if (this.m_runtimeSortFilterInfo[j].PeerSortFilters == null)
                     {
                         this.m_runtimeSortFilterInfo[j].PeerSortFilters = new Hashtable();
                     }
                     for (int num4 = 0; num4 < peerSortFilters.Count; num4++)
                     {
                         if (eventSource.ID != peerSortFilters[num4])
                         {
                             this.m_runtimeSortFilterInfo[j].PeerSortFilters.Add(peerSortFilters[num4], null);
                         }
                     }
                 }
             }
         }
         return(true);
     }
     return(false);
 }