Package com.microstrategy.web.app.utils
Class PrintBeanHelper
- java.lang.Object
-
- com.microstrategy.web.app.utils.PrintBeanHelper
-
public class PrintBeanHelper extends java.lang.ObjectThe PrintBeanHelper is a helper for printing, exporting and PDF- Since:
- MicroStrategy Web 7.3.1 or earlier
-
-
Constructor Summary
Constructors Constructor Description PrintBeanHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleangetCheckboxOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)Deprecated.static intgetCurrentReportCells(ReportBean rb)Calculates the current number of cells on the report.static java.lang.StringgetDate()Returns a String representation of the date.static java.lang.StringgetDate(java.lang.String localeID)Returns a String representation of the date.static java.lang.StringgetDescriptor(int key, Messages messages)Returns a localized descriptor for the specified keystatic java.lang.StringgetErrorInGraphReport(ReportBean rb, Messages messages)Returns whether the graph report is in errorstatic java.lang.StringgetErrorInGraphReport(ReportBean rb, Messages messages, WebIServerSession session)Returns whether the graph report is in errorstatic java.lang.StringgetOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)Deprecated.static intgetReportTotalCols(ReportBean rb)Returns the report's total number of columns depending on the view modestatic intgetReportTotalRows(ReportBean rb)Returns the report's total number of rows depending on the view modestatic java.lang.StringgetTime()Returns a String representation of the time.static java.lang.StringgetTime(java.lang.String localeID)Returns a String representation of the time.static intgetTotalReportCells(ReportBean rb)Calculates the total number of cells on the report.static booleanisReportPageByEmpty(ReportBean rb)Checks if the report has elements on the page-by axisstatic voidrenderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages)Renders the filter detailsstatic voidrenderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText)Deprecated.static voidrenderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, boolean isOldStyle)Renders the filter detailsstatic voidrenderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, java.lang.String newLine, java.lang.String rowPrefix, java.lang.String rowSuffix, boolean isOldStyle)Renders the filter detailsstatic voidrenderPagebyInfo(MarkupOutput mo, ReportBean rb, java.lang.String stylePagebyInfo, Messages messages)Renders the page-by information by transforming the report bean with the stylePageby parameter.static voidsetResultWindow(ReportBean rb, int startRow, int startCol, int maxRows, int maxCols)Sets the result window of the report instance to the proper values depending on the input parameters
-
-
-
Method Detail
-
isReportPageByEmpty
public static boolean isReportPageByEmpty(ReportBean rb)
Checks if the report has elements on the page-by axis- Parameters:
rb- Report Bean- Returns:
- true is the report has no elements on the page-by axis
-
renderFilterDetails
public static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages)
Renders the filter details- Parameters:
mo- MarkupOutput objectrb- Report beanmessages- Messages object
-
renderFilterDetails
@Deprecated public static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText)
Deprecated.Renders the filter details- Parameters:
mo- MarkupOutput objectrb- Report beanmessages- Messages objectisPlainText- determines whether to generate the results in plain text (used for Excel with plaintext)
-
renderFilterDetails
public static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, boolean isOldStyle)
Renders the filter details- Parameters:
mo- MarkupOutput objectrb- Report beanmessages- Messages objectisPlainText- determines whether to generate the results in plain text (used for Excel with plaintext)isOldStyle- determines whether to generate the results with indentation (used for Old Style Filter Details)- Since:
- MicroStrategy Web 7.5.1
-
renderFilterDetails
public static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, java.lang.String newLine, java.lang.String rowPrefix, java.lang.String rowSuffix, boolean isOldStyle)
Renders the filter details- Parameters:
mo- MarkupOutput objectrb- Report beanmessages- Messages objectisPlainText- determines whether to generate the results in plain text (used for Excel with plaintext)newLine- The line Separator to use.rowPrefix- The prefix for each rowrowSuffix- The suffix for each rowisOldStyle- Denotes whether the Filter Details have to be rendered using old style.- Since:
- MicroStrategy Web 8.0.0
-
renderPagebyInfo
public static void renderPagebyInfo(MarkupOutput mo, ReportBean rb, java.lang.String stylePagebyInfo, Messages messages)
Renders the page-by information by transforming the report bean with the stylePageby parameter.- Parameters:
mo- MarkupOutput objectrb- report beanstylePagebyInfo- style to usemessages- Messages object
-
getDescriptor
public static java.lang.String getDescriptor(int key, Messages messages)Returns a localized descriptor for the specified key- Parameters:
key- intmessages- Messages- Returns:
- String
-
setResultWindow
public static void setResultWindow(ReportBean rb, int startRow, int startCol, int maxRows, int maxCols)
Sets the result window of the report instance to the proper values depending on the input parameters- Parameters:
rb- report beanstartRow- window's start rowstartCol- window's start columnmaxRows- window's maximum rowmaxCols- window's maximum column
-
getTotalReportCells
public static int getTotalReportCells(ReportBean rb) throws WebAppException
Calculates the total number of cells on the report.- Parameters:
rb- report- Returns:
- number of cells
- Throws:
WebAppException
-
getCurrentReportCells
public static int getCurrentReportCells(ReportBean rb) throws WebAppException
Calculates the current number of cells on the report.- Parameters:
rb- report- Returns:
- number of cells
- Throws:
WebAppException
-
getReportTotalRows
public static int getReportTotalRows(ReportBean rb)
Returns the report's total number of rows depending on the view mode- Parameters:
rb- ReportBean to print- Returns:
- total number of rows
-
getReportTotalCols
public static int getReportTotalCols(ReportBean rb)
Returns the report's total number of columns depending on the view mode- Parameters:
rb- ReportBean to print- Returns:
- total number of columns
-
getTime
public static java.lang.String getTime()
Returns a String representation of the time. Used for the header/footer in print and PDF.- Returns:
- a String representation of the time.
-
getTime
public static java.lang.String getTime(java.lang.String localeID)
Returns a String representation of the time. Used for the header/footer in print and PDF.- Parameters:
localeID- locale to display the date in.- Returns:
- a String representation of the time.
- Since:
- MicroStrategy Web 7.5.0
-
getDate
public static java.lang.String getDate()
Returns a String representation of the date. Used for the header/footer in print and PDF.- Returns:
- a String representation of the date.
-
getDate
public static java.lang.String getDate(java.lang.String localeID)
Returns a String representation of the date. Used for the header/footer in print and PDF.- Parameters:
localeID- locale to display the date in.- Returns:
- a String representation of the date.
- Since:
- MicroStrategy Web 7.5.0
-
getOptionValue
@Deprecated public static java.lang.String getOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)
Deprecated.
-
getCheckboxOptionValue
@Deprecated public static boolean getCheckboxOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, java.lang.String preferenceName, java.lang.String propertyName)
Deprecated.
-
getErrorInGraphReport
public static java.lang.String getErrorInGraphReport(ReportBean rb, Messages messages)
Returns whether the graph report is in error- Parameters:
rb- Report beanmessages- Messages object- Returns:
- error in graph (if any)
- Since:
- MicroStrategy Web 7.5.0
-
getErrorInGraphReport
public static java.lang.String getErrorInGraphReport(ReportBean rb, Messages messages, WebIServerSession session)
Returns whether the graph report is in error- Parameters:
rb- Report beanmessages- Messages object- Returns:
- error in graph (if any)
- Since:
- MicroStrategy Web 9.0.1
-
-