MicroStrategy ONE

Creating a New Ribbon for a Report

All reports in MicroStrategy Web use the following ribbons: Home, Tools, Data, Grid and Format. And each ribbon has its own toolbar and menu defined for it. In this customization scenario, you add a new ribbon called Publish that displays a new toolbar and menu (and a submenu) with options specific to publishing such as printing and exporting.

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 Toolbars to expand the list of toolbars used in MicroStrategy Web. 

  4. Right-click any DHTML toolbar (indicated by the letter D) and select New Toolbar

  5. Enter ReportPublishToolbarModel as the name for the toolbar and click OK

  6. Right-click ReportPublishToolbarModel and select New Toolbar Element. This launches the New Toolbar Element wizard. The following steps create the toolbar element for Print

    1. Click Browse and select the icon that will be used for the toolbar element. For this scenario, use tbPrint.gif from the style\mstr\images folder inside the MicroStrategy Web installation.

    2. Click ... next to the text field for Tooltip Description and select mstrWeb.314.

    3. Under Select the type of action to be triggered when clicking on this toolbar element, select Command for this toolbar item and enter printPDF.

    4. Click Modify next to the text field for Select the feature that will determine whether this toolbar element should be shown and select features is-viewable-report, pdf, enable-pdf and pdf-print.

    5. Click OK.

    6. Enter onselectionchange in the text field for Type in the listener method.

    7. Click Next.

    8. Click Finish. The new toolbar element tb_tbPrint (Print) gets added under the new toolbar ReportPublishToolbarModel.  

  7. Right-click ReportPublishToolbarModel and select New Toolbar Element. This launches the New Toolbar Element wizard. The following steps create the toolbar element for PDF

    1. Click Browse and select the icon that will be used for the toolbar element. For this scenario, use tbPDF.gif from the style\mstr\images folder inside the MicroStrategy Web installation.

    2. Click ... next to the text field for Tooltip Description and select mstrWeb.1877.

    3. Under Select the type of action to be triggered when clicking on this toolbar element, select Command for this toolbar item and enter buttonPDF.

    4. Click Modify next to the text field for Select the feature that will determine whether this toolbar element should be shown and select features not-datamart, web-export-to-pdf and enable-pdf.

    5. Click OK.

    6. Enter ongridselectionschange in the text field for Type in the listener method.

    7. Click Next.

    8. Click Finish. The new toolbar element tb_tbPDF (PDF) gets added under the new toolbar ReportPublishToolbarModel.

  8. Right-click ReportPublishToolbarModel and select New Toolbar Element. This launches the New Toolbar Element wizard. The following steps create the toolbar element for Export

    1. Click Browse and select the icon that will be used for the toolbar element. For this scenario, use tbExport.gif from the style\mstr\images folder inside the MicroStrategy Web installation.

    2. Click ... next to the text field for Tooltip Description and select mstrWeb.246.

    3. Under Select the type of action to be triggered when clicking on this toolbar element, select Command for this toolbar item and enter export.

    4. Click Modify next to the text field for Select the feature that will determine whether this toolbar element should be shown and select features enable-export and show-report-export-tool.

    5. Click OK.

    6. Enter ongridselectionschange in the text field for Type in the listener method.

    7. Click Next.

    8. Click Finish. The new toolbar element tb_tbExport (Export) gets added under the new toolbar ReportPublishToolbarModel

  9. Click on Menus to expand the list of menus used in MicroStrategy Web. 

  10. Right-click any DHTML Menu (indicated by the letter D) and select New Menu

  11. Enter RptPublishMenu as the name for the menu and click OK

  12. Right-click RptPublishMenu and select New Menu Element. This launches the New Menu Element wizard. The following steps create the menu element for Print

    1. Click ... next to the text field for Type in a name for new menu element and select mstrWeb.2109.

    2. Under Select the type of action to be triggered when clicking on this menu element, select Command for this menu item and enter printPDF.

    3. Click Modify next to the text field for Select the feature that will determine whether this menu element should be shown and select features is-viewable-report, pdf, enable-pdf and pdf-print.

    4. Click OK.

    5. Enter onselectionchange in the text field for Type in the listener method.

    6. Click Next.

    7. Click Finish. The new menu element MenuControlModel (Print...) gets added under the new menu RptPublishMenu.  

  13. Right-click RptPublishMenu and select New Sub-Menu Element. This launches the New Menu Element wizard. The following steps create the submenu for Export

    1. Click ... next to the text field for Type in a name for new sub-menu and select mstrWeb.246.

    2. Select Use existing menu and select RptHomeExportMenu from the drop-down menu.

    3. Click Modify next to the text field for Select the feature that will determine whether this menu element should be shown and select features is-viewable-report and show-report-export-menu.

    4. Click OK.

    5. Enter onReportReload in the text field for Type in the listener method.

    6. Select RptExportMenuBlockLoader from the drop-down menu for Style.

    7. Click ... next to the text field for Layout and select HomeExportMenuLayout.xml (located in the WEB-INF/xml/layouts/blocks folder of the MicroStrategy Web installation) .

    8. Click Next.

    9. Click Finish. The new submenu element SubMenuControlModel (Export) gets added under the new menu RptPublishMenu.

  14. Click on Ribbons to expand the list of ribbons used in MicroStrategy Web. 

  15. Right-click report and select New Ribbon

  16. Enter Publish as the name for the ribbon and click OK. This ribbon opens in the right frame for editing. 

  17. Enter Publish in the text field for Descriptor

  18. Select ReportPublishToolbarModel from the drop-down menu for Select a Toolbar

  19. Select RptPublishMenu from the drop-down menu for Select a Menu

  20. Click Modify next to the text field for Enable this toolbar for this ribbon only if the following feature(s) is(are) available and select feature menu-toolbar

  21. Click OK

  22. Save your changes. 

  23. Launch MicroStrategy Web to view the customization.

See Also