MicroStrategy ONE

Modifying Predefined Quick Thresholds

The default range for predefined quick thresholds is top and bottom 20%. This customization modifies the range to top and bottom 30%.

Before customization

After customization

This customization can be accomplished using either of the following methods:

Deploying the plug-in provided with MicroStrategy SDK

MicroStrategy SDK provides a plug-in (ZIP file) that can simply be extracted to thepluginsfolder to view the customization in MicroStrategy Web. The following steps guide you in locating the plug-in and deploying it. 

  1. Access the plug-in: JSP version or ASP .NET version

  2. Extract the plug-in to the plugins subfolder inside the MicroStrategy Web installation folder.   

  3. Launch MicroStrategy Web to view the customization.

Using the Web Customization Editor to create a plug-in

MicroStrategy SDK provides a Web Customization Editor that can be used to create a customization plug-in. The following steps guide you in creating the plug-in and deploying it. 

  1. Launch the Web Customization Editor

  2. Create a new plug-in and give it a meaningful name. For example: ModifyingPredefinedThresholds

  3. Exit the Web Customization Editor. 

  4. Navigate to the javascript folder inside the MicroStrategy Web installation folder and copy mstrQuickThresholds.js

  5. Paste this copy of mstrQuickThresholds.js inside the customization plug-in folder. For example: plugins/ModifyingPredefinedThresholds/javascript

  6. Open this copy of mstrQuickThresholds.js for editing. To modify the predefined quick threshold background formatting condition to top and bottom 30%, make the change shown in bold below.

    defineQuickThreshold(0, 0, "FormattingPatterns!FillColor!255;", "", "", "", "30", THRESHOLD_TYPE_LOWEST_PERCENT, "name");

    defineQuickThreshold(0, 1, "FormattingPatterns!FillColor!32768;", "", "", "70", "", THRESHOLD_TYPE_LOWEST_PERCENT, "name");

  7. Save your changes. 

  8. If the Web Customization Editor is closed, launch it again and access your plug-in

  9. Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations. 

  10. Click on Pages to expand the list of pages used in MicroStrategy Web. 

  11. Double-click the report (Report Execution) page. 

  12. Click the Template Properties tab at the bottom in the right frame to make changes to the Default page template. 

  13. Right-click the links page section and select Edit current file

  14. Click the Yes button in the prompt to edit Report_Links.jsp/ascx

  15. Make the following change shown in bold to specify the location of mstrQuickThresholds.js inside the customization plug-in folder. Replace the name highlighted in bold below with the name of your plug-in.

    J2EE environment:

    ...

    <web:resource type="javascript" name="../plugins/ModifyingPredefinedThresholds/javascript/mstrQuickThresholds.js"/>

    ...

    .NET environment:

    ...

    <web:resource runat="server" type="javascript" name="../plugins/ModifyingPredefinedThresholds/javascript/mstrQuickThresholds.js"/>

    ...

  16. Save your changes. 

  17. Enable the Property Files setting from the Show Advanced Options in MicroStrategy Preferences 

  18. Click on MicroStrategy Web Configuration inside the Application Settings view to expand the hierarchical tree. The expanded list comprises the different settings that can be modified to perform customizations. 

  19. Navigate to Property Files->WEB-INF->classes->resources and double-click MessagesBundle_en_US.properties to launch the Web Properties Editor. 

  20. Enter a new property-value pair in the text field at the bottom confirming to the syntax nameOfProperty=value. For example: scenario1.6=Top and Bottom 30% - Background Color

  21. Click Add

  22. Save your changes. 

  23. Exit the Web Customization Editor. 

  24. Create an XML file, ReportDataToolbarModel.xml, with the following code.

    <!DOCTYPE block SYSTEM "../dtds/blockLibrary.dtd">

    <block inherits="RptToolbarModel" name="ReportDataToolbarModel">

      <assignments>

        <property name="items">

          <list>

            <block listElementKey="K1174">

              <property name="items">

                <list>

                  <block listElementKey="K1175">

                    <property name="desc">{desc:scenario1.6|Top and Bottom 30% - Background Color}</property>

                  </block>

                </list>

              </property>

            </block>

          </list>

        </property>

      </assignments>

    </block>

  25. Save this XML file, ReportDataToolbarModel.xml, in the plugins\pluginName\WEB-INF\xml\blocks subfolder inside the MicroStrategy Web installation folder. For example: plugins\ModifyingPredefinedThresholds\WEB-INF\xml\blocks

  26. Save your changes. 

  27. Launch MicroStrategy Web to view the customization.