Example #1
0
 public ReportSize this[int index]
 {
     get
     {
         if (index < 0 || index >= Count)
         {
             throw new RenderingObjectModelException(ProcessingErrorCode.rsInvalidParameterRange, index, 0, Count);
         }
         ReportSize reportSize = null;
         if (m_reportSizeCollection != null && m_reportSizeCollection[index] != null)
         {
             reportSize = m_reportSizeCollection[index];
         }
         if (reportSize == null)
         {
             Microsoft.ReportingServices.ReportProcessing.Matrix matrix = (Microsoft.ReportingServices.ReportProcessing.Matrix)m_owner.ReportItemDef;
             MatrixInstance       matrixInstance       = (MatrixInstance)m_owner.ReportItemInstance;
             ReportSizeCollection reportSizeCollection = null;
             reportSizeCollection = ((!m_widthsCollection) ? matrix.CellHeightsForRendering : matrix.CellWidthsForRendering);
             Global.Tracer.Assert(reportSizeCollection != null);
             if (m_owner.NoRows || matrixInstance == null || matrixInstance.Cells.Count == 0)
             {
                 reportSize = reportSizeCollection[index];
             }
             else if ((m_widthsCollection && matrix.StaticColumns == null) || (!m_widthsCollection && matrix.StaticRows == null))
             {
                 reportSize = reportSizeCollection[0];
             }
             else
             {
                 bool cacheState = m_owner.RenderingContext.CacheState;
                 m_owner.RenderingContext.CacheState = true;
                 MatrixCellCollection cellCollection = m_owner.CellCollection;
                 MatrixCell           matrixCell     = null;
                 matrixCell = ((!m_widthsCollection) ? cellCollection[index, 0] : cellCollection[0, index]);
                 reportSize = reportSizeCollection[matrixCell.ColumnIndex];
                 m_owner.RenderingContext.CacheState = cacheState;
             }
             if (m_owner.RenderingContext.CacheState)
             {
                 if (m_reportSizeCollection == null)
                 {
                     m_reportSizeCollection = new ReportSizeCollection(Count);
                 }
                 m_reportSizeCollection[index] = reportSize;
             }
         }
         return(reportSize);
     }
 }
Example #2
0
        private static bool SearchRangeCells(Matrix matrix, int indexRow, IntList hiddenColumns, SearchContext searchContext)
        {
            int  num         = 0;
            int  columnIndex = 0;
            bool flag        = false;
            MatrixCellCollection cellCollection = matrix.CellCollection;

            num = 0;
            while (!flag && num < matrix.CellColumns)
            {
                if (!HiddenColumn(hiddenColumns, ref columnIndex, num))
                {
                    flag = cellCollection[indexRow, num].ReportItem.Search(searchContext);
                }
                num++;
            }
            return(flag);
        }