Class ReportGridCellMetricValueImpl

  • All Implemented Interfaces:
    ReportGridCellMetricValue, ReportGridDisplayCell, java.lang.Cloneable
    Direct Known Subclasses:
    IPhoneReportGridCellMetricValueImpl, ReportGridExcelCellMetricValueImpl

    public class ReportGridCellMetricValueImpl
    extends AbstractReportGridDisplayCell
    implements ReportGridCellMetricValue

    The ReportGridCellMetricValue is used to generate the HTML of a cell value of the report data.

    It uses a WebRowValue as the underlying SDK objects to retrieve the information from.

    The ReportGridCellColTitleImpl extends the AbstractReportGridDisplayCell which controls the exeuction flow.

    Users who intend to programatically modify the HTML generated for a metric value should extend this class. Using this technique developers could define their own rules of the text to display based on the WebTitle content.

    The following is an example of a class that extends the generateText(com.microstrategy.web.beans.MarkupOutput) method of this class based on the title's template unit type:
     public class CustomMetricValueextends ReportGridCellMetricValueImpl {
         public void generateText(MarkupOutput mo) {
             WebRowValue rowValue = getWebRowValue();
             if (rowValue != null) {
                 String spanPrefix = "";
                 String spanPostfix = "";
                 switch (rowValue.getSemantics()) {
                 case EnumDSSXMLBaseFormType.DssXmlBaseFormPicture:
                 case EnumDSSXMLBaseFormType.DssXmlBaseFormUrl:
                     //For threshold images
                     Tag imgTag = TagsFactory.getInstance().newTag("img");
                     imgTag.setAttribute(EnumHTMLTags.ATT_SRC, rowValue.getValue());
                 case EnumDSSXMLBaseFormType.DssXmlBaseFormSymbol:
                     //For thresholds quick symbols
                     generateThresholdSymbol(mo, Integer.parseInt(rowValue.getValue()));
                 case EnumDSSXMLBaseFormType.DssXmlBaseFormHTMLTag:
             } else {
    MicroStrategy Web 7.5.1
    See Also:
    ReportGridDisplayCell, ReportGridTransformImpl
    • Constructor Detail

      • ReportGridCellMetricValueImpl

        public ReportGridCellMetricValueImpl()
        Constructor used for creating a generic display cell.