Ejemplo n.º 1
0
        public bool Search(int searchPage, string findValue)
        {
            SearchContext searchContext = new SearchContext(searchPage, findValue, 0, this.NumberOfPages - 1);
            PageSection   pageSection   = this.PageHeader;
            PageSection   pageSection2  = this.PageFooter;
            bool          flag          = false;
            bool          flag2         = false;

            if (pageSection != null)
            {
                if (searchPage > 0 && searchPage < this.NumberOfPages - 1)
                {
                    goto IL_0057;
                }
                if (searchPage == 0 && pageSection.PrintOnFirstPage)
                {
                    goto IL_0057;
                }
                if (searchPage != 0 && searchPage == this.NumberOfPages - 1 && pageSection.PrintOnLastPage)
                {
                    goto IL_0057;
                }
            }
            goto IL_0059;
IL_0057:
            flag = true;
            goto IL_0059;
IL_0094:
            flag2 = true;
            goto IL_0097;
IL_0097:
            if ((flag || flag2) && this.NeedsHeaderFooterEvaluation)
            {
                PageSection pageSection3 = null;
                PageSection pageSection4 = null;
                AspNetCore.ReportingServices.ReportProcessing.ReportProcessing.EvaluateHeaderFooterExpressions(searchPage + 1, this.NumberOfPages, this, (PageReportItems)null, out pageSection3, out pageSection4);
                if (this.m_reportDef.PageHeaderEvaluation)
                {
                    pageSection = pageSection3;
                }
                if (this.m_reportDef.PageFooterEvaluation)
                {
                    pageSection2 = pageSection4;
                }
            }
            bool flag3 = false;

            if (flag)
            {
                flag3 = pageSection.Search(searchContext);
            }
            if (!flag3)
            {
                flag3 = this.Body.Search(searchContext);
                if (!flag3 && flag2)
                {
                    flag3 = pageSection2.Search(searchContext);
                }
            }
            return(flag3);

IL_0059:
            if (pageSection2 != null)
            {
                if (searchPage > 0 && searchPage < this.NumberOfPages - 1)
                {
                    goto IL_0094;
                }
                if (searchPage != this.NumberOfPages - 1 && searchPage == 0 && pageSection2.PrintOnFirstPage)
                {
                    goto IL_0094;
                }
                if (searchPage == this.NumberOfPages - 1 && pageSection2.PrintOnLastPage)
                {
                    goto IL_0094;
                }
            }
            goto IL_0097;
        }
Ejemplo n.º 2
0
        private static bool SearchRowCells(TableCellCollection rowCells, TableColumnCollection columns, SearchContext searchContext)
        {
            bool flag = false;

            if (rowCells == null)
            {
                return(flag);
            }
            int num = 0;

            while (!flag && num < rowCells.Count)
            {
                if (!columns[num].Hidden)
                {
                    flag = rowCells[num].ReportItem.Search(searchContext);
                }
                num++;
            }
            return(flag);
        }
Ejemplo n.º 3
0
 public virtual bool Search(SearchContext searchContext)
 {
     return(false);
 }
Ejemplo n.º 4
0
        private static bool SearchPartialTableGroup(TableGroup group, TableColumnCollection columns, SearchContext searchContext)
        {
            TableHeaderFooterRows tableHeaderFooterRows = null;
            bool          flag           = false;
            SearchContext searchContext2 = new SearchContext(searchContext);

            tableHeaderFooterRows = group.GroupHeader;
            if (tableHeaderFooterRows != null)
            {
                if (searchContext.SearchPage == searchContext.ItemStartPage || tableHeaderFooterRows.RepeatOnNewPage)
                {
                    flag = Table.SearchTableRows(tableHeaderFooterRows, columns, searchContext2);
                }
                if (flag)
                {
                    return(true);
                }
            }
            TableGroupCollection subGroups = group.SubGroups;

            if (subGroups != null)
            {
                int num  = 0;
                int num2 = 0;
                int num3 = -1;
                int num4 = -1;
                group.GetSubGroupsOnPage(searchContext.SearchPage, out num, out num2);
                if (num >= 0)
                {
                    SearchContext searchContext3 = new SearchContext(searchContext);
                    group.IsGroupOnThisPage(num, searchContext.SearchPage, out num3, out num4);
                    TableGroup tableGroup = subGroups[num];
                    if (num3 != num4)
                    {
                        searchContext3.ItemStartPage = num3;
                        searchContext3.ItemEndPage   = num4;
                        flag = Table.SearchPartialTableGroup(tableGroup, columns, searchContext3);
                    }
                    else
                    {
                        flag = Table.SearchFullTableGroup(tableGroup, columns, searchContext2);
                    }
                    num++;
                    while (!flag && num < num2)
                    {
                        tableGroup = subGroups[num];
                        flag       = Table.SearchFullTableGroup(tableGroup, columns, searchContext2);
                        num++;
                    }
                    if (!flag && num == num2)
                    {
                        tableGroup = subGroups[num];
                        group.IsGroupOnThisPage(num, searchContext.SearchPage, out num3, out num4);
                        if (num3 != num4)
                        {
                            searchContext3.ItemStartPage = num3;
                            searchContext3.ItemEndPage   = num4;
                            flag = Table.SearchPartialTableGroup(tableGroup, columns, searchContext3);
                        }
                        else
                        {
                            flag = Table.SearchFullTableGroup(tableGroup, columns, searchContext2);
                        }
                    }
                }
            }
            else
            {
                TableRowsCollection detailRows = group.DetailRows;
                if (detailRows != null)
                {
                    int num5 = 0;
                    int num6 = 0;
                    int num7 = 0;
                    group.GetDetailsOnThisPage(searchContext.SearchPage - searchContext.ItemStartPage, out num5, out num6);
                    if (num5 >= 0)
                    {
                        num7 = num5 + num6 - 1;
                        while (!flag && num5 <= num7)
                        {
                            flag = Table.SearchTableRows(detailRows[num5], columns, searchContext2);
                            num5++;
                        }
                    }
                }
            }
            if (flag)
            {
                return(true);
            }
            tableHeaderFooterRows = group.GroupFooter;
            if (tableHeaderFooterRows != null && (tableHeaderFooterRows.RepeatOnNewPage || searchContext.ItemEndPage == searchContext.SearchPage))
            {
                flag = Table.SearchTableRows(tableHeaderFooterRows, columns, searchContext2);
            }
            return(flag);
        }
Ejemplo n.º 5
0
        private static bool SearchTableRows(TableRowCollection tableRows, TableColumnCollection columns, SearchContext searchContext)
        {
            bool flag = false;

            if (tableRows == null)
            {
                return(flag);
            }
            TableRow tableRow = null;
            int      num      = 0;

            while (!flag && num < tableRows.Count)
            {
                tableRow = tableRows[num];
                if (!tableRow.Hidden)
                {
                    flag = Table.SearchRowCells(tableRow.TableCellCollection, columns, searchContext);
                }
                num++;
            }
            return(flag);
        }
Ejemplo n.º 6
0
        private static bool SearchFullTableGroup(TableGroup tableGroup, TableColumnCollection columns, SearchContext searchContext)
        {
            bool result = false;

            if (tableGroup != null && !tableGroup.Hidden)
            {
                result = Table.SearchTableRows(tableGroup.GroupHeader, columns, searchContext);
                if (!result)
                {
                    TableGroupCollection subGroups = tableGroup.SubGroups;
                    if (subGroups != null)
                    {
                        int num = 0;
                        while (!result && num < subGroups.Count)
                        {
                            result = Table.SearchFullTableGroup(subGroups[num], columns, searchContext);
                            num++;
                        }
                    }
                    else
                    {
                        TableRowsCollection detailRows = tableGroup.DetailRows;
                        if (detailRows != null)
                        {
                            int num2 = 0;
                            while (!result && num2 < detailRows.Count)
                            {
                                result = Table.SearchTableRows(detailRows[num2], columns, searchContext);
                                num2++;
                            }
                        }
                    }
                }
                if (!result)
                {
                    result = Table.SearchTableRows(tableGroup.GroupFooter, columns, searchContext);
                }
                return(result);
            }
            return(result);
        }
Ejemplo n.º 7
0
        private static bool SearchRowTotal(Matrix matrix, MatrixMemberCollection rowTotalChildren, IntList hiddenColumns, SearchContext searchContext)
        {
            bool         flag         = false;
            MatrixMember matrixMember = null;
            int          num          = 0;

            while (!flag && num < rowTotalChildren.Count)
            {
                matrixMember = rowTotalChildren[num];
                flag         = matrixMember.ReportItem.Search(searchContext);
                if (!flag)
                {
                    flag = Matrix.SearchRangeCells(matrix, matrixMember.MemberCellIndex, hiddenColumns, searchContext);
                }
                num++;
            }
            return(flag);
        }
Ejemplo n.º 8
0
        private static bool SearchRangeCells(Matrix matrix, int indexRow, IntList hiddenColumns, SearchContext searchContext)
        {
            int  num  = 0;
            int  num2 = 0;
            bool flag = false;
            MatrixCellCollection cellCollection = matrix.CellCollection;

            num = 0;
            while (!flag && num < matrix.CellColumns)
            {
                if (!Matrix.HiddenColumn(hiddenColumns, ref num2, num))
                {
                    flag = cellCollection[indexRow, num].ReportItem.Search(searchContext);
                }
                num++;
            }
            return(flag);
        }
Ejemplo n.º 9
0
        private static bool SearchMatrixColumns(MatrixMemberCollection columns, ref IntList hiddenColumns, SearchContext searchContext)
        {
            if (columns == null)
            {
                return(false);
            }
            bool                   flag                   = false;
            int                    num                    = 0;
            int                    num2                   = columns.Count - 1;
            int                    num3                   = 0;
            MatrixMember           matrixMember           = null;
            MatrixMemberCollection matrixMemberCollection = null;
            SearchContext          searchContext2         = new SearchContext(searchContext);
            int                    index                  = 0;
            int                    count                  = 0;

            num3 = num2 - num + 1;
            int num4 = num;

            while (!flag && num4 <= num2)
            {
                matrixMember = columns[num4];
                if (matrixMember.Hidden)
                {
                    if (matrixMember.IsTotal)
                    {
                        if (hiddenColumns != null)
                        {
                            index = hiddenColumns.Count;
                        }
                        count = matrixMember.ColumnSpan;
                    }
                    Matrix.BuildHiddenColumns(matrixMember, ref hiddenColumns);
                    num3--;
                }
                else
                {
                    flag = matrixMember.ReportItem.Search(searchContext2);
                    if (!flag)
                    {
                        matrixMemberCollection = matrixMember.Children;
                        flag = Matrix.SearchMatrixColumns(matrixMemberCollection, ref hiddenColumns, searchContext2);
                    }
                }
                num4++;
            }
            if (num3 == 0)
            {
                hiddenColumns.RemoveRange(index, count);
                if (!flag)
                {
                    if (!matrixMember.IsTotal)
                    {
                        matrixMember = columns[0];
                    }
                    matrixMemberCollection = matrixMember.Children;
                    if (matrixMemberCollection != null)
                    {
                        int num5 = 0;
                        while (!flag && num5 < matrixMemberCollection.Count)
                        {
                            matrixMember = matrixMemberCollection[num5];
                            flag         = matrixMember.ReportItem.Search(searchContext2);
                            num5++;
                        }
                    }
                }
            }
            return(flag);
        }
Ejemplo n.º 10
0
        private static bool SearchMatrixRowsContent(Matrix matrix, MatrixMember member, SearchContext searchContext, IntList hiddenColumns)
        {
            bool                   flag                    = false;
            int                    num                     = 0;
            int                    num2                    = 0;
            int                    num3                    = 0;
            MatrixMember           matrixMember            = null;
            MatrixMemberCollection matrixMemberCollection  = null;
            MatrixMemberCollection matrixMemberCollection2 = null;
            SearchContext          searchContext2          = new SearchContext(searchContext);
            bool                   flag2                   = false;

            matrixMemberCollection2 = ((member != null) ? member.Children : matrix.RowMemberCollection);
            if (searchContext.ItemStartPage != searchContext.ItemEndPage)
            {
                if (member == null)
                {
                    matrix.GetRowMembersOnPage(searchContext.SearchPage, out num, out num2);
                }
                else
                {
                    member.GetChildRowMembersOnPage(searchContext.SearchPage, out num, out num2);
                }
                flag2 = true;
            }
            else
            {
                num  = 0;
                num2 = matrixMemberCollection2.Count - 1;
            }
            num3 = num2 - num + 1;
            int num4 = num;

            while (!flag && num4 <= num2)
            {
                matrixMember = matrixMemberCollection2[num4];
                if (matrixMember.Hidden)
                {
                    num3--;
                }
                else
                {
                    matrixMemberCollection = matrixMember.Children;
                    if (matrixMemberCollection != null)
                    {
                        flag = matrixMember.ReportItem.Search(searchContext2);
                        if (!flag)
                        {
                            if (flag2 && (num4 == num || num4 == num2))
                            {
                                int           itemStartPage  = 0;
                                int           itemEndPage    = 0;
                                SearchContext searchContext3 = new SearchContext(searchContext);
                                if (member == null)
                                {
                                    matrix.IsRowMemberOnThisPage(num4, searchContext.SearchPage, out itemStartPage, out itemEndPage);
                                }
                                else
                                {
                                    member.IsRowMemberOnThisPage(num4, searchContext.SearchPage, out itemStartPage, out itemEndPage);
                                }
                                searchContext3.ItemStartPage = itemStartPage;
                                searchContext3.ItemEndPage   = itemEndPage;
                                flag = Matrix.SearchMatrixRowsContent(matrix, matrixMember, searchContext3, hiddenColumns);
                            }
                            else
                            {
                                flag = Matrix.SearchMatrixRowsContent(matrix, matrixMember, searchContext2, hiddenColumns);
                            }
                        }
                    }
                    else
                    {
                        flag = matrixMember.ReportItem.Search(searchContext2);
                        if (!flag)
                        {
                            flag = Matrix.SearchRangeCells(matrix, matrixMember.MemberCellIndex, hiddenColumns, searchContext2);
                        }
                    }
                }
                num4++;
            }
            if (!flag && num3 == 0)
            {
                if (!matrixMember.IsTotal)
                {
                    matrixMember = matrixMemberCollection2[0];
                }
                matrixMemberCollection = matrixMember.Children;
                flag = ((matrixMemberCollection == null) ? Matrix.SearchRangeCells(matrix, matrixMember.MemberCellIndex, hiddenColumns, searchContext2) : Matrix.SearchRowTotal(matrix, matrixMemberCollection, hiddenColumns, searchContext2));
            }
            return(flag);
        }