public DataElementOutputTypes DataElementOutputForStatic(MatrixMember staticHeading)
 {
     if (!this.IsStatic)
     {
         return(this.DataElementOutput);
     }
     if (staticHeading != null && (!staticHeading.IsStatic || staticHeading.Parent == this.Parent))
     {
         staticHeading = null;
     }
     if (staticHeading != null)
     {
         int index;
         int index2;
         if (this.m_headingDef.IsColumn)
         {
             index  = staticHeading.m_index;
             index2 = this.m_index;
         }
         else
         {
             index  = this.m_index;
             index2 = staticHeading.m_index;
         }
         return(this.GetDataElementOutputTypeFromCell(index, index2));
     }
     AspNetCore.ReportingServices.ReportProcessing.Matrix matrix = (AspNetCore.ReportingServices.ReportProcessing.Matrix)base.OwnerDataRegion.ReportItemDef;
     if (matrix.PivotStaticColumns != null && matrix.PivotStaticRows != null)
     {
         Global.Tracer.Assert(matrix.PivotStaticColumns != null && matrix.PivotStaticRows != null);
         return(this.GetDataElementOutputTypeForRowCol(this.m_index));
     }
     return(this.GetDataElementOutputTypeFromCell(0, this.m_index));
 }
Esempio n. 2
0
        private int IndexCellDefinition(AspNetCore.ReportingServices.ReportProcessing.Matrix matrixDef)
        {
            int num = 0;

            if (this.m_owner.NoRows)
            {
                return(this.m_rowIndex * matrixDef.MatrixColumns.Count + this.m_columnIndex);
            }
            return(this.InstanceInfo.RowIndex * matrixDef.MatrixColumns.Count + this.InstanceInfo.ColumnIndex);
        }
Esempio n. 3
0
 public Matrix(int intUniqueName, AspNetCore.ReportingServices.ReportProcessing.Matrix reportItemDef, MatrixInstance reportItemInstance, RenderingContext renderingContext)
     : base(intUniqueName, reportItemDef, reportItemInstance, renderingContext)
 {
     if (reportItemInstance != null && reportItemInstance.Cells.Count != 0 && reportItemInstance.Cells[0].Count != 0)
     {
         this.m_rowMemberMapping = Matrix.CalculateMapping(reportItemDef.Rows, reportItemInstance.RowInstances, false);
         this.m_colMemberMapping = Matrix.CalculateMapping(reportItemDef.Columns, reportItemInstance.ColumnInstances, false);
         this.m_noRows           = (this.m_rowMemberMapping.Count == 0 || 0 == this.m_colMemberMapping.Count);
     }
     else
     {
         this.m_noRows = true;
     }
 }
        private DataElementOutputTypes GetDataElementOutputTypeForRowCol(int index)
        {
            AspNetCore.ReportingServices.ReportProcessing.Matrix matrix = (AspNetCore.ReportingServices.ReportProcessing.Matrix)base.OwnerDataRegion.ReportItemDef;
            int num;
            int num2;
            int count;

            if (this.m_headingDef.IsColumn)
            {
                num   = 0;
                num2  = index;
                count = matrix.MatrixRows.Count;
            }
            else
            {
                num   = index;
                num2  = 0;
                count = matrix.MatrixColumns.Count;
            }
            while (true)
            {
                AspNetCore.ReportingServices.ReportProcessing.ReportItem cellReportItem = matrix.GetCellReportItem(num, num2);
                if (cellReportItem.DataElementOutput != DataElementOutputTypes.NoOutput)
                {
                    return(DataElementOutputTypes.Output);
                }
                if (this.m_headingDef.IsColumn)
                {
                    num++;
                    if (num >= count)
                    {
                        break;
                    }
                }
                else
                {
                    num2++;
                    if (num2 >= count)
                    {
                        break;
                    }
                }
            }
            return(DataElementOutputTypes.NoOutput);
        }
        public static ReportItem CreateItem(string uniqueName, AspNetCore.ReportingServices.ReportProcessing.ReportItem reportItemDef, ReportItemInstance reportItemInstance, RenderingContext renderingContext, NonComputedUniqueNames nonComputedUniqueNames)
        {
            if (reportItemDef == null)
            {
                return(null);
            }
            Global.Tracer.Assert(null != renderingContext);
            ReportItem reportItem    = null;
            int        intUniqueName = 0;

            NonComputedUniqueNames[] childrenNonComputedUniqueNames = null;
            if (reportItemInstance != null)
            {
                intUniqueName = reportItemInstance.UniqueName;
            }
            else if (nonComputedUniqueNames != null)
            {
                intUniqueName = nonComputedUniqueNames.UniqueName;
                childrenNonComputedUniqueNames = nonComputedUniqueNames.ChildrenUniqueNames;
            }
            if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Line)
            {
                AspNetCore.ReportingServices.ReportProcessing.Line reportItemDef2 = (AspNetCore.ReportingServices.ReportProcessing.Line)reportItemDef;
                LineInstance reportItemInstance2 = (LineInstance)reportItemInstance;
                reportItem = new Line(uniqueName, intUniqueName, reportItemDef2, reportItemInstance2, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.CheckBox)
            {
                AspNetCore.ReportingServices.ReportProcessing.CheckBox reportItemDef3 = (AspNetCore.ReportingServices.ReportProcessing.CheckBox)reportItemDef;
                CheckBoxInstance reportItemInstance3 = (CheckBoxInstance)reportItemInstance;
                reportItem = new CheckBox(uniqueName, intUniqueName, reportItemDef3, reportItemInstance3, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Image)
            {
                AspNetCore.ReportingServices.ReportProcessing.Image reportItemDef4 = (AspNetCore.ReportingServices.ReportProcessing.Image)reportItemDef;
                ImageInstance reportItemInstance4 = (ImageInstance)reportItemInstance;
                reportItem = new Image(uniqueName, intUniqueName, reportItemDef4, reportItemInstance4, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.TextBox)
            {
                AspNetCore.ReportingServices.ReportProcessing.TextBox reportItemDef5 = (AspNetCore.ReportingServices.ReportProcessing.TextBox)reportItemDef;
                TextBoxInstance reportItemInstance5 = (TextBoxInstance)reportItemInstance;
                reportItem = new TextBox(uniqueName, intUniqueName, reportItemDef5, reportItemInstance5, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Rectangle)
            {
                AspNetCore.ReportingServices.ReportProcessing.Rectangle reportItemDef6 = (AspNetCore.ReportingServices.ReportProcessing.Rectangle)reportItemDef;
                RectangleInstance reportItemInstance6 = (RectangleInstance)reportItemInstance;
                reportItem = new Rectangle(uniqueName, intUniqueName, reportItemDef6, reportItemInstance6, renderingContext, childrenNonComputedUniqueNames);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.ActiveXControl)
            {
                AspNetCore.ReportingServices.ReportProcessing.ActiveXControl reportItemDef7 = (AspNetCore.ReportingServices.ReportProcessing.ActiveXControl)reportItemDef;
                ActiveXControlInstance reportItemInstance7 = (ActiveXControlInstance)reportItemInstance;
                reportItem = new ActiveXControl(uniqueName, intUniqueName, reportItemDef7, reportItemInstance7, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.SubReport)
            {
                AspNetCore.ReportingServices.ReportProcessing.SubReport subReport = (AspNetCore.ReportingServices.ReportProcessing.SubReport)reportItemDef;
                SubReportInstance subReportInstance = (SubReportInstance)reportItemInstance;
                bool   processedWithError           = false;
                Report innerReport;
                if (AspNetCore.ReportingServices.ReportProcessing.SubReport.Status.Retrieved != subReport.RetrievalStatus)
                {
                    innerReport        = null;
                    processedWithError = true;
                }
                else
                {
                    if (subReport.ReportContext == null && renderingContext.CurrentReportContext != null)
                    {
                        subReport.ReportContext = renderingContext.CurrentReportContext.GetSubreportContext(subReport.ReportPath);
                    }
                    ICatalogItemContext reportContext     = subReport.ReportContext;
                    RenderingContext    renderingContext2 = new RenderingContext(renderingContext, subReport.Uri, subReport.Report.EmbeddedImages, subReport.Report.ImageStreamNames, reportContext);
                    if (subReportInstance == null)
                    {
                        innerReport = new Report(subReport.Report, null, renderingContext2, subReport.ReportName, subReport.Description, null);
                    }
                    else if (subReportInstance.ReportInstance == null)
                    {
                        processedWithError = true;
                        innerReport        = new Report(subReport.Report, null, renderingContext2, subReport.ReportName, subReport.Description, null);
                    }
                    else
                    {
                        innerReport = new Report(subReport.Report, subReportInstance.ReportInstance, renderingContext2, subReport.ReportName, subReport.Description, null);
                    }
                }
                reportItem = new SubReport(intUniqueName, subReport, subReportInstance, renderingContext, innerReport, processedWithError);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.List)
            {
                AspNetCore.ReportingServices.ReportProcessing.List reportItemDef8 = (AspNetCore.ReportingServices.ReportProcessing.List)reportItemDef;
                ListInstance reportItemInstance8 = (ListInstance)reportItemInstance;
                reportItem = new List(intUniqueName, reportItemDef8, reportItemInstance8, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Matrix)
            {
                AspNetCore.ReportingServices.ReportProcessing.Matrix reportItemDef9 = (AspNetCore.ReportingServices.ReportProcessing.Matrix)reportItemDef;
                MatrixInstance reportItemInstance9 = (MatrixInstance)reportItemInstance;
                reportItem = new Matrix(intUniqueName, reportItemDef9, reportItemInstance9, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Table)
            {
                AspNetCore.ReportingServices.ReportProcessing.Table reportItemDef10 = (AspNetCore.ReportingServices.ReportProcessing.Table)reportItemDef;
                TableInstance reportItemInstance10 = (TableInstance)reportItemInstance;
                reportItem = new Table(intUniqueName, reportItemDef10, reportItemInstance10, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.OWCChart)
            {
                AspNetCore.ReportingServices.ReportProcessing.OWCChart reportItemDef11 = (AspNetCore.ReportingServices.ReportProcessing.OWCChart)reportItemDef;
                OWCChartInstance reportItemInstance11 = (OWCChartInstance)reportItemInstance;
                reportItem = new OWCChart(intUniqueName, reportItemDef11, reportItemInstance11, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.Chart)
            {
                AspNetCore.ReportingServices.ReportProcessing.Chart reportItemDef12 = (AspNetCore.ReportingServices.ReportProcessing.Chart)reportItemDef;
                ChartInstance reportItemInstance12 = (ChartInstance)reportItemInstance;
                reportItem = new Chart(intUniqueName, reportItemDef12, reportItemInstance12, renderingContext);
            }
            else if (reportItemDef is AspNetCore.ReportingServices.ReportProcessing.CustomReportItem)
            {
                AspNetCore.ReportingServices.ReportProcessing.CustomReportItem reportItemDef13 = (AspNetCore.ReportingServices.ReportProcessing.CustomReportItem)reportItemDef;
                CustomReportItemInstance reportItemInstance13 = (CustomReportItemInstance)reportItemInstance;
                reportItem = new CustomReportItem(uniqueName, intUniqueName, reportItemDef13, reportItemInstance13, renderingContext, childrenNonComputedUniqueNames);
                if (!renderingContext.NativeAllCRITypes && (renderingContext.NativeCRITypes == null || !renderingContext.NativeCRITypes.ContainsKey(((CustomReportItem)reportItem).Type)))
                {
                    reportItem = ((CustomReportItem)reportItem).AltReportItem;
                }
            }
            return(reportItem);
        }
Esempio n. 6
0
        public ReportSize this[int index]
        {
            get
            {
                ReportSize           reportSize;
                ReportSizeCollection reportSizeCollection;
                if (index >= 0 && index < this.Count)
                {
                    reportSize = null;
                    if (this.m_reportSizeCollection != null && this.m_reportSizeCollection[index] != null)
                    {
                        reportSize = this.m_reportSizeCollection[index];
                    }
                    if (reportSize == null)
                    {
                        AspNetCore.ReportingServices.ReportProcessing.Matrix matrix = (AspNetCore.ReportingServices.ReportProcessing.Matrix) this.m_owner.ReportItemDef;
                        MatrixInstance matrixInstance = (MatrixInstance)this.m_owner.ReportItemInstance;
                        reportSizeCollection = null;
                        reportSizeCollection = ((!this.m_widthsCollection) ? matrix.CellHeightsForRendering : matrix.CellWidthsForRendering);
                        Global.Tracer.Assert(null != reportSizeCollection);
                        if (this.m_owner.NoRows || matrixInstance == null || matrixInstance.Cells.Count == 0)
                        {
                            reportSize = reportSizeCollection[index];
                        }
                        else
                        {
                            if (this.m_widthsCollection && matrix.StaticColumns == null)
                            {
                                goto IL_0107;
                            }
                            if (!this.m_widthsCollection && matrix.StaticRows == null)
                            {
                                goto IL_0107;
                            }
                            bool cacheState = this.m_owner.RenderingContext.CacheState;
                            this.m_owner.RenderingContext.CacheState = true;
                            MatrixCellCollection cellCollection = this.m_owner.CellCollection;
                            MatrixCell           matrixCell     = null;
                            matrixCell = ((!this.m_widthsCollection) ? cellCollection[index, 0] : cellCollection[0, index]);
                            reportSize = reportSizeCollection[matrixCell.ColumnIndex];
                            this.m_owner.RenderingContext.CacheState = cacheState;
                        }
                        goto IL_0184;
                    }
                    goto IL_01bc;
                }
                throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, index, 0, this.Count);
IL_01bc:
                return(reportSize);

IL_0107:
                reportSize = reportSizeCollection[0];
                goto IL_0184;
IL_0184:
                if (this.m_owner.RenderingContext.CacheState)
                {
                    if (this.m_reportSizeCollection == null)
                    {
                        this.m_reportSizeCollection = new ReportSizeCollection(this.Count);
                    }
                    this.m_reportSizeCollection[index] = reportSize;
                }
                goto IL_01bc;
            }
        }
 private DataElementOutputTypes GetDataElementOutputTypeFromCell(int rowIndex, int columnIndex)
 {
     AspNetCore.ReportingServices.ReportProcessing.Matrix     matrix         = (AspNetCore.ReportingServices.ReportProcessing.Matrix)base.OwnerDataRegion.ReportItemDef;
     AspNetCore.ReportingServices.ReportProcessing.ReportItem cellReportItem = matrix.GetCellReportItem(rowIndex, columnIndex);
     return(cellReportItem.DataElementOutput);
 }