Package com.microstrategy.web.beans
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 theReportBean
on which we are performing pagination. Changes (mainly through report windown settings) are also reflected on theReportBean
. 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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
changePageByPosition(int offset)
Moves from the current page-by position to another page by offset value.void
generateAllPages()
Generates all pages in one call to the backend over Network.int
getColMode()
int
getColumnsOnPage()
Returns the actual number of grid columns on the current logical page.int
getColumnsPerPage()
Returns the maximum number of columns a caller prefers on the current instance.int
getPageByCount()
Returns the total number of page-by pages of this particular report.int
getPageByPosition()
Returns the current page-by position.int
getPageIndex(int direction)
Returns the index of the current logical page.int
getPageSetHeight()
Returns the total number of logical pages in the Y-axis for the currentReportBean
based on the total number of rows of the whole report data.int
getPageSetWidth()
Returns the total number of logical pages in the X-axis for the currentReportBean
based on the total number of columns of the whole report data.int
getPageType()
Returns the page type.int
getPageXPosition()
Returns the X-axis coordinate of the current instance.int
getPageYPosition()
Returns the Y-axis coordinate of the current instance.int
getPreviousPageXPosition()
Returns the previous X-axis coordinate of the current instance.int
getPreviousPageYPosition()
Returns the previous Y-axis coordinate of the current instance.ReportBean
getReportAtCurrentPage()
Returns theReportBean
object representing a logical page corresponding to this page info.ReportBean
getReportAtPage(int xPos, int yPos)
Returns aReportBean
instance representing a logical page with the specified coordinates.int
getRowMode()
int
getRowsOnPage()
Returns the actual number of grid rows on the current logical page.int
getRowsPerPage()
Returns the maximum number of rows a caller prefers on the current instance.int
getStartingColumn()
Returns the starting grid column for the current logical page.int
getStartingRow()
Returns the starting grid row for the current logical page.int
getTotalPages()
Returns the total number of logical pages for the current report data.boolean
isTruncated()
Returns True if the report page collected has been truncated.void
setBaseReportInstance(WebReportInstance ri)
Sets a base report instance, which all manipulations will use as their baseline.void
setColMode(int value)
void
setColumnsPerPage(int columnsPerPage)
Sets the maximum number of columns a caller prefers on the current instance.void
setPageXPosition(int pageXPos)
Sets the X-axis coordinate of the current instance.void
setPageYPosition(int pageYPos)
Sets the Y-axis coordinate of the current instance.void
setRowMode(int value)
void
setRowsPerPage(int rowsPerPage)
Sets the maximum number of rows a caller prefers on the current instance.
-
-
-
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 currentReportBean
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 currentReportBean
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 aReportBean
instance representing a logical page with the specified coordinates.- Parameters:
xPos
- the X-axis coordinate of a logical pageyPos
- 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 fromEnumPageInfoDirection
- 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 underEnumReportPageType
- Returns:
- the page type.
-
getReportAtCurrentPage
ReportBean getReportAtCurrentPage() throws WebBeanException
Returns theReportBean
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
-
setRowMode
void setRowMode(int value) throws WebBeanException
- Throws:
WebBeanException
-
getRowMode
int getRowMode()
-
setColMode
void setColMode(int value) throws WebBeanException
- Throws:
WebBeanException
-
getColMode
int getColMode()
-
-