PerformSearch Method in Microsoft.Reporting.WinForms.ServerReport

85 views Asked by At

Can someone explain about PerformSearch Method in Microsoft.Reporting.WinForms.ServerReport

ServerReport As Microsoft.Reporting.WinForms.ServerReport = Nothing

int result=ServerReport.GetType.GetMethod("PerformSearch", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic).Invoke(ServerReport, {SearchValue, CurrentPage + 1, CurrentPage + 1})

What are the input parameters and return value for PerformSearch method?

1

There are 1 answers

1
Robert Harvey On BEST ANSWER

OK, I loaded up this Nuget Package, fired up Telerik JustDecompile, opened Microsoft.ReportViewer.WinForms.dll, did a search on PerformSearch, and found the method. This is what the method looks like:

    internal override int PerformSearch(string searchText, int startPage, int endPage)
    {
        int num;
        lock (this.m_syncObject)
        {
            if (!this.IsReadyForProcessingPostTasks)
            {
                throw new InvalidOperationException(CommonStrings.ReportNotReady);
            }
            num = this.Service.FindString(startPage, endPage, searchText);
        }
        return num;
    }

If you want to find out more, you can download and install JustDecompile yourself. The FindString() method in the code above is clickable in JustDecompile; it will take you to that method in the source.