Ejemplo n.º 1
0
 public MatrixSubtotalCellInstance(int rowIndex, int colIndex, Matrix matrixDef, int cellDefIndex, ReportProcessing.ProcessingContext pc, out NonComputedUniqueNames nonComputedUniqueNames)
     : base(rowIndex, colIndex, matrixDef, cellDefIndex, pc, out nonComputedUniqueNames)
 {
     Global.Tracer.Assert(null != pc.HeadingInstance);
     Global.Tracer.Assert(null != pc.HeadingInstance.MatrixHeadingDef.Subtotal.StyleClass);
     this.m_subtotalHeadingInstance = pc.HeadingInstance;
 }
 public void Add(MatrixHeadingInstance matrixHeadingInstance, ReportProcessing.ProcessingContext pc)
 {
     if (this.m_lastHeadingInstance != null)
     {
         this.m_lastHeadingInstance.InstanceInfo.HeadingSpan = matrixHeadingInstance.InstanceInfo.HeadingCellIndex - this.m_lastHeadingInstance.InstanceInfo.HeadingCellIndex;
         bool          flag             = true;
         MatrixHeading matrixHeadingDef = this.m_lastHeadingInstance.MatrixHeadingDef;
         if (pc.ReportItemsReferenced)
         {
             Matrix matrix = (Matrix)matrixHeadingDef.DataRegionDef;
             if (matrixHeadingDef.IsColumn)
             {
                 if (matrix.ProcessingInnerGrouping == Pivot.ProcessingInnerGroupings.Column)
                 {
                     flag = false;
                 }
             }
             else if (matrix.ProcessingInnerGrouping == Pivot.ProcessingInnerGroupings.Row)
             {
                 flag = false;
             }
         }
         if (flag)
         {
             bool flag2;
             if (this.m_lastHeadingInstance.IsSubtotal)
             {
                 flag2 = this.m_lastHeadingInstance.MatrixHeadingDef.Subtotal.FirstInstance;
                 this.m_lastHeadingInstance.MatrixHeadingDef.Subtotal.FirstInstance = false;
             }
             else
             {
                 BoolList firstHeadingInstances = this.m_lastHeadingInstance.MatrixHeadingDef.FirstHeadingInstances;
                 flag2 = firstHeadingInstances[this.m_lastHeadingInstance.HeadingIndex];
                 firstHeadingInstances[this.m_lastHeadingInstance.HeadingIndex] = false;
             }
             pc.ChunkManager.AddInstance(this.m_lastHeadingInstance.InstanceInfo, this.m_lastHeadingInstance, flag2 || matrixHeadingDef.InFirstPage, pc.InPageSection);
         }
     }
     base.Add(matrixHeadingInstance);
     this.m_lastHeadingInstance = matrixHeadingInstance;
     matrixHeadingInstance.MatrixHeadingDef.InFirstPage = pc.ChunkManager.InFirstPage;
 }
Ejemplo n.º 3
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;
        }
 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);
     }
 }