public class

PrintBeanHelper

extends Object
java.lang.Object
   ↳ com.microstrategy.web.app.utils.PrintBeanHelper

Class Overview

The PrintBeanHelper is a helper for printing, exporting and PDF

Summary

Public Constructors
PrintBeanHelper()
Public Methods
static boolean getCheckboxOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, String preferenceName, String propertyName)
static int getCurrentReportCells(ReportBean rb)
Calculates the current number of cells on the report.
static String getDate(String localeID)
Returns a String representation of the date.
static String getDate()
Returns a String representation of the date.
static String getDescriptor(int key, Messages messages)
Returns a localized descriptor for the specified key
static String getErrorInGraphReport(ReportBean rb, Messages messages)
Returns whether the graph report is in error
static String getErrorInGraphReport(ReportBean rb, Messages messages, WebIServerSession session)
Returns whether the graph report is in error
static String getOptionValue(RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, String preferenceName, String propertyName)
static int getReportTotalCols(ReportBean rb)
Returns the report's total number of columns depending on the view mode
static int getReportTotalRows(ReportBean rb)
Returns the report's total number of rows depending on the view mode
static String getTime()
Returns a String representation of the time.
static String getTime(String localeID)
Returns a String representation of the time.
static int getTotalReportCells(ReportBean rb)
Calculates the total number of cells on the report.
static boolean isReportPageByEmpty(ReportBean rb)
Checks if the report has elements on the page-by axis
static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages)
Renders the filter details
static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText)
This method is deprecated. No replacement.
static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, boolean isOldStyle)
Renders the filter details
static void renderFilterDetails(MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, String newLine, String rowPrefix, String rowSuffix, boolean isOldStyle)
Renders the filter details
static void renderPagebyInfo(MarkupOutput mo, ReportBean rb, String stylePagebyInfo, Messages messages)
Renders the page-by information by transforming the report bean with the stylePageby parameter.
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
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PrintBeanHelper ()

Public Methods

public static boolean getCheckboxOptionValue (RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, String preferenceName, String propertyName)

public static int getCurrentReportCells (ReportBean rb)

Calculates the current number of cells on the report.

Parameters
rb report
Returns
  • number of cells

public static String getDate (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.

public static 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.

public static String getDescriptor (int key, Messages messages)

Returns a localized descriptor for the specified key

Parameters
key int
messages Messages
Returns
  • String

public static String getErrorInGraphReport (ReportBean rb, Messages messages)

Returns whether the graph report is in error

Parameters
rb Report bean
messages Messages object
Returns
  • error in graph (if any)

public static String getErrorInGraphReport (ReportBean rb, Messages messages, WebIServerSession session)

Returns whether the graph report is in error

Parameters
rb Report bean
messages Messages object
Returns
  • error in graph (if any)

public static String getOptionValue (RequestKeys rk, Preferences pref, HashList propertyValues, boolean propertiesPresent, String preferenceName, String propertyName)

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

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

public static 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.

public static String getTime (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.

public static int getTotalReportCells (ReportBean rb)

Calculates the total number of cells on the report.

Parameters
rb report
Returns
  • number of cells

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

public static void renderFilterDetails (MarkupOutput mo, ReportBean rb, Messages messages)

Renders the filter details

Parameters
mo MarkupOutput object
rb Report bean
messages Messages object

public static void renderFilterDetails (MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText)

This method is deprecated.
No replacement.

Renders the filter details

Parameters
mo MarkupOutput object
rb Report bean
messages Messages object
isPlainText determines whether to generate the results in plain text (used for Excel with plaintext)

public static void renderFilterDetails (MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, boolean isOldStyle)

Renders the filter details

Parameters
mo MarkupOutput object
rb Report bean
messages Messages object
isPlainText 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)

public static void renderFilterDetails (MarkupOutput mo, ReportBean rb, Messages messages, boolean isPlainText, String newLine, String rowPrefix, String rowSuffix, boolean isOldStyle)

Renders the filter details

Parameters
mo MarkupOutput object
rb Report bean
messages Messages object
isPlainText 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 row
rowSuffix The suffix for each row
isOldStyle Denotes whether the Filter Details have to be rendered using old style.

public static void renderPagebyInfo (MarkupOutput mo, ReportBean rb, String stylePagebyInfo, Messages messages)

Renders the page-by information by transforming the report bean with the stylePageby parameter.

Parameters
mo MarkupOutput object
rb report bean
stylePagebyInfo style to use
messages Messages object

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 bean
startRow window's start row
startCol window's start column
maxRows window's maximum row
maxCols window's maximum column