MicroStrategy ONE

Displaying Objects Selected in a Report

This customization scenario uses JavaScript and context menus to display the selections you make by clicking a report object such as attribute or metric elements in a report grid. By default, when you click an attribute or a metric element, that cell gets highlighted. In this scenario, you can right-click the highlighted cell and select Alert Values from the context menu to see the selection. This scenario also works for multiple selections of report objects.

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

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

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

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

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

  7. Click Yes in the confirmation dialog. Report_Links (JSP or ASP .NET) opens for editing. 

  8. Add the following line of code as the last line in the file.

    J2EE environment:

    <web:resource type="custom-javascript" name="alertvalues.js" />

    .NET environment:

    <web:resource runat="server" type="custom-javascript" name="alertvalues.js" />

  1. Save your changes. 

  2. Navigate to MicroStrategy Web Configuration->Context Menus->reportCellContextMenus->default

  3. Right-click default and select New Shortcut

  4. Enter alertValues in the text field as the name for the shortcut and click OK

  5. New shortcut alertValues opens in the Shortcut Attributes editor on the right for editing. Note that this new shortcut alertValues is displayed as a new shortcut under the shortcut-list default

  6. Enter Alert Values in the Descriptor text field. 

  7. Click the Advanced Properties tab at the bottom in the Shortcut Attributes editor

  8. Enter var grid = microstrategy.findBone(microstrategy.activeCXMenu); if (grid && grid.isGrid) grid.alertValues() in the text field for Onclick

  9. Enter var grid = microstrategy.findBone(microstrategy.activeCXMenu); if(grid && grid.isGrid)grid.dhtmlEnabledforAlertValues(); in the text field for DHTML Enabled

  10. Save your changes. 

  11. Exit the Web Customization Editor. 

  12. Create a subfolder, javascript, inside the plugins\pluginName subfolder inside the MicroStrategy Web installation folder. For example: plugins\DisplayingObjectsSelectedReport\javascript

  13. Create a JavaScript file, alertvalues.js, that contains the logic for retrieving the selections in a report grid. The sample, alertvalues.js,contains the entire code for this JavaScript file. 

  14. Save this custom JavaScript file, alertvalues.js, in the plugins\pluginName\javascript subfolder inside the MicroStrategy Web installation folder. For example: plugins\DisplayingObjectsSelectedReport\javascript

  15. Launch MicroStrategy Web to view the customization.

See Also