MicroStrategy ONE

Displaying Folder Contents and Report on the Same Page

By default, folder contents and reports are displayed on separate MicroStrategy Web pages. Folder contents are displayed using any of the Folder Browsing pages, such as Shared Reports or My Reports, while reports are displayed on the Report Execution page.

In this customization scenario, you modify the Report Execution page so that both the report and folder contents are displayed on the same page. This allows you to browse through folders on the same page on which a report is displayed. It also allows you to replace the current report with another report— without leaving the report page— simply by selecting a different report from the folder contents displayed on the same page as the report.

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 content page section and select Edit current file

  7. Click the Yes button in the prompt to edit Report_Content.jsp/ascx

  8. Make the following code changes shown below.:

    J2EE environment:

    Add the following lines of code shown in bold. The bold lines include the CSS and JavaScript files required for displaying the contents of the folder.

    ...

    ...

    %><%@ page errorPage="JSP_Error.jsp"

    %><%@ page contentType="text/html; charset=UTF-8"

    %><%@ taglib uri="/webUtilTL.tld" prefix="web"%>

     

    <link rel="stylesheet" type="text/css" <web:resource type="style" attribute="href" name="mstr/pageFolder.css"/>/>

     

    <web:ifFeature name="dhtml"><web:then>

    <script language="JavaScript" <web:resource type="javascript" attribute="src" name="ObjectManipulation.js"/>></script>

    </web:then></web:ifFeature>

    ...

    ...

    Add the following lines of code after every occurrence of <web:displayGuiComponent name="report_area" isContainer="true"/>.

    <web:displayGuiComponent name="folder_browser" isContainer="false"/>


    <web:displayGuiComponent name="object_manipulation" isContainer="false"/>

    .NET environment:

    Add the following lines of code shown in bold. The bold lines include the CSS and JavaScript files required for displaying the contents of the folder.

    <%@ Control Language="vb" AutoEventWireUp="false" CodeFile="Report_Content.ascx.vb" Inherits="MicroStrategy.Report_Content"%>

    <%@ Register TagPrefix="web" Namespace="MicroStrategy.Tags"%>

     

    <link rel="stylesheet" type="text/css" <web:resourcerunat="server"type="style" attribute="href" name="mstr/pageFolder.css"/>/>

     

    <web:ifFeature name="dhtml"><web:mthen>

    <script language="JavaScript" <web:resourcerunat="server"type="javascript" attribute="src" name="ObjectManipulation.js"/>></script>

    </web:mthen></web:ifFeature>

    ...

    ...

    Add the following lines of code after every occurrence of <web:displayGuiComponent runat="server" name="report_area" isContainer="true"/>.

    <web:displayGuiComponent runat="server" name="folder_browser" isContainer="false"/>

    <web:displayGuiComponent runat="server" name="object_manipulation" isContainer="false"/>

  9. Save your changes. 

  10. Navigate back to report (Report Execution) and right-click on Beans and select New Bean to launch the New Web Bean Wizard

  11. Enter the following information::

    Name: fb
    System Bean
    : FolderBean
    Persist Mode
    : Request 

  12. Click Next

  13. Do not select any Web Features, and click Next

  14. Select Yes to specify a custom event handler for this bean. 

  15. Click ... and enter AggregatedFolderEventHandler

  16. Select AggregatedFolderEventHandler from the project and click OK

  17. Click Next

  18. Select initialization parameters: sysFolder, objectID and flags, and click >>

  19. Click Next

  20. Select request parameters: sysFolder and click >>

  21. Click Next

  22. Click Finish. The new bean fb gets added as a bean under Beans

  23. Click fb to view the bean details in the Bean Properties editor

  24. In the Initialization Properties panel, make the following changes.

    • Change Type and Value for flags to int and 268453447 respectively.

    • Change Source and Value for objectID to preference and sharedReportsFolderID respectively.

    • Change Type and Value for sysFolder to int and 7 respectively. 

  25. In the Request Properties panel, make the following changes

    • Change Type, Source and Value for sysFolder to int, request and systemFolder respectively. 

  26. Save your changes. 

  27. Right-click on Beans and select New Bean to launch the New Web Bean Wizard

  28. Enter the following information::

    Name: OMD
    System Bean
    : ObjectManipulationDialogBean
    Persist Mode
    : Request 

  29. Click Next

  30. Do not select any Web Features, and click Next

  31. Select No since there is no custom event handler for this bean and click Next

  32. Select initialization parameters: targetBeanPathandisModal, and click >>

  33. Click Next

  34. Do not select any request parameters, and click Next. 

  35. Click Finish. The new bean OMD gets added as a bean under Beans

  36. Click OMD to view the bean details in the Bean Properties editor

  37. In the Initialization Properties panel, make the following changes.

    • Change Type and Value for isModal to boolean and true respectively.

    • Change  Value for targetBeanPath to fb

  38. In the Bean Styles panel, click Add

  39. Select ObjectManipulationDialogStyle and click >> to add the style. 

  40. Click OK

  41. Save your changes. 

  42. Right-click on OMD under Beans and select New Bean to launch the New Web Bean Wizard

  43. Enter the following information::

    Name: omdfb
    System Bean
    : FolderBean
    Persist Mode
    : Request 

  44. Click Next

  45. Do not select any Web Features, and click Next

  46. Select No since there is no custom event handler for this bean and click Next

  47. Do not select any initialization parameters, and click Next

  48. Do not select any request parameters, and click Next. 

  49. Click Finish. The new bean omdfb gets added as a child bean under OMD

  50. Click omdfb to view the bean details in the Bean Properties editor

  51. In the Bean Styles panel, click Add

  52. Select FolderStyleOMDBrowse and click >> to add the style. 

  53. Click OK

  54. Save your changes. 

  55. Navigate back to Pages->report (Report Execution) page. 

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

  57. Click the Template Properties tab at the bottom in the right frame. 

  58. Click New in the Display Components section. 

  59. Enter folder_browser in the Component Name text field. 

  60. Select fb from the drop-down menu for Web Bean associated with this component

  61. Click Next

  62. Enter folderViewMode in the Style associated to this component text field. 

  63. Select the check box for From Preference

  64. Click Next

  65. Click Finish

  66. Click New in the Display Components section. 

  67. Enter object_manipulation in the Component Name text field. 

  68. Select OMD from the drop-down menu for Web Bean associated with this component

  69. Click Next

  70. Enter ObjectManipulationDialogStyle in the Style associated to this component text field. 

  71. Click Next

  72. Click Finish

  73. Save your changes. 

  74. Launch MicroStrategy Web to view the customization.

See Also