Interface ReportPageInfo


  • public interface ReportPageInfo
    This interface is designed specifically to support incremental fetch of report data. By specifying the number of grid rows and columns to appear on each page, a caller virtually cuts the whole set of report grid data into a set of pages. Each of these virtual pages can be uniquely identified by its positions (or coordinates) in a two-dimension surface with X axis representing the grid columns and Y axis representing the grid rows.

    This interface also supports page-by operations. It calculates how much total pages a report has, and allows callers to set an arbitrary page-by position, and then moves to any other page based on an offset value.

    Two types of ReportPageInfo are supported. The absolute page info is synchronized with the ReportBean on which we are performing pagination. Changes (mainly through report windown settings) are also reflected on the ReportBean. On the other hand, the relative page info is kind of independant, to allow further chopping of the absolute page info into even smaller pages.

    Since:
    MicroStrategy Web 7.3.1 or earlier
    • Method Detail

      • getRowsPerPage

        int getRowsPerPage()
        Returns the maximum number of rows a caller prefers on the current instance.
        Returns:
        the maximum number of rows set on the current instance. -1 means all rows in the current page.
      • setRowsPerPage

        void setRowsPerPage​(int rowsPerPage)
        Sets the maximum number of rows a caller prefers on the current instance.
        Parameters:
        rowsPerPage - the maximum number of rows to set.
      • getColumnsPerPage

        int getColumnsPerPage()
        Returns the maximum number of columns a caller prefers on the current instance.
        Returns:
        the maximum number of columns set on the current instance. -1 means all columns in the current page.
      • setColumnsPerPage

        void setColumnsPerPage​(int columnsPerPage)
        Sets the maximum number of columns a caller prefers on the current instance.
        Parameters:
        columnsPerPage - the maximum number of columns to set.
      • getPageXPosition

        int getPageXPosition()
        Returns the X-axis coordinate of the current instance. The coordinate starts with 0.
        Returns:
        the X-axis coordinate of the current instance.
      • setPageXPosition

        void setPageXPosition​(int pageXPos)
                       throws WebBeanException
        Sets the X-axis coordinate of the current instance. The coordinate starts with 0.
        Parameters:
        pageXPos - the X-axis coordinate to set.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getPageYPosition

        int getPageYPosition()
        Returns the Y-axis coordinate of the current instance. The coordinate starts with 0.
        Returns:
        the Y-axis coordinate of the current instance.
      • setPageYPosition

        void setPageYPosition​(int pageYPos)
                       throws WebBeanException
        Sets the Y-axis coordinate of the current instance. The coordinate starts with 0.
        Parameters:
        pageYPos - the Y-axis coordinate to set.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getPreviousPageXPosition

        int getPreviousPageXPosition()
        Returns the previous X-axis coordinate of the current instance. The coordinate starts with 0.
        Returns:
      • getPreviousPageYPosition

        int getPreviousPageYPosition()
        Returns the previous Y-axis coordinate of the current instance. The coordinate starts with 0.
        Returns:
      • getPageSetWidth

        int getPageSetWidth()
                     throws WebBeanException
        Returns the total number of logical pages in the X-axis for the current ReportBean based on the total number of columns of the whole report data.
        Returns:
        the total number of logical pages in the X-axis.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getPageSetHeight

        int getPageSetHeight()
                      throws WebBeanException
        Returns the total number of logical pages in the Y-axis for the current ReportBean based on the total number of rows of the whole report data.
        Returns:
        the total number of logical pages in the Y-axis.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getStartingRow

        int getStartingRow()
                    throws WebBeanException
        Returns the starting grid row for the current logical page.
        Returns:
        the starting grid row for the current logical page.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getRowsOnPage

        int getRowsOnPage()
                   throws WebBeanException
        Returns the actual number of grid rows on the current logical page.
        Returns:
        the actual number of grid rows on the current logical page.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getStartingColumn

        int getStartingColumn()
                       throws WebBeanException
        Returns the starting grid column for the current logical page.
        Returns:
        the starting grid column for the current logical page.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getColumnsOnPage

        int getColumnsOnPage()
                      throws WebBeanException
        Returns the actual number of grid columns on the current logical page.
        Returns:
        the actual number of grid columns on the current logical page.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getReportAtPage

        ReportBean getReportAtPage​(int xPos,
                                   int yPos)
                            throws WebBeanException
        Returns a ReportBean instance representing a logical page with the specified coordinates.
        Parameters:
        xPos - the X-axis coordinate of a logical page
        yPos - the Y-axis coordinate of a logical page
        Returns:
        the generated ReportBean instance.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getTotalPages

        int getTotalPages()
                   throws WebBeanException
        Returns the total number of logical pages for the current report data. It is equivalent to the multiplication of pageSetWidth and pageSetHeight.
        Returns:
        the total number of logical pages for the current report data.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getPageIndex

        int getPageIndex​(int direction)
                  throws WebBeanException
        Returns the index of the current logical page. Index starts from the number 0.
        Parameters:
        direction - a value from EnumPageInfoDirection
        Returns:
        the index of the current logical page.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • getPageType

        int getPageType()
        Returns the page type. Possible Values are listed under EnumReportPageType
        Returns:
        the page type.
      • getReportAtCurrentPage

        ReportBean getReportAtCurrentPage()
                                   throws WebBeanException
        Returns the ReportBean object representing a logical page corresponding to this page info.
        Returns:
        Report Bean corresponding to this page info.
        Throws:
        WebBeanException - thrown if any error occurs during processing.
      • generateAllPages

        void generateAllPages()
                       throws WebBeanException
        Generates all pages in one call to the backend over Network.

        This method is not yet supported.

        Throws:
        WebBeanException - thrown if error occurs
      • changePageByPosition

        int changePageByPosition​(int offset)
                          throws WebBeanException
        Moves from the current page-by position to another page by offset value. The moving is bi-directional and positive value means to move down to the next page while a negative values moves back to a previous page. It stops at the first page or the last page if the offset is too large or too small (negative number).
        Parameters:
        offset - how many pages to move from the current page position
        Returns:
        the next available page by offset value
        Throws:
        WebBeanException - thrown if error occurs during processing
      • getPageByPosition

        int getPageByPosition()
                       throws WebBeanException
        Returns the current page-by position. The position starts with 1, and the maximum possible value is the total count of page-by pages.
        Returns:
        the curren page-by position.
        Throws:
        WebBeanException - thrown if error occurs during processing
      • getPageByCount

        int getPageByCount()
                    throws WebBeanException
        Returns the total number of page-by pages of this particular report.
        Returns:
        the total number of page-by pages.
        Throws:
        WebBeanException - thrown if error occurs during processing
      • isTruncated

        boolean isTruncated()
        Returns True if the report page collected has been truncated. The page could be truncated if the requested window settings exceed the IServer cell limit.
        Returns:
        True if the report page collected from IServer has been truncated.
        Since:
        MicroStrategy Web 7.5.0
      • setBaseReportInstance

        void setBaseReportInstance​(WebReportInstance ri)
        Sets a base report instance, which all manipulations will use as their baseline. This will mean that anytime the page is changed, the same state ID will be used for new pages.
        Parameters:
        ri - The WebReportInstance to use as the base report instance.
        Since:
        MicroStrategy Web 8.1.2
      • getRowMode

        int getRowMode()
      • getColMode

        int getColMode()