MicroStrategy ONE

Creating a Custom Report Page and Accessing It through a Link on an Existing Page

There may be instances when you want to be able to open one page by clicking a link on another page. For instance, if you are looking at a report that shows multiple years of data for a variety of nested attributes, you may want to be able to open a report that shows the entire hierarchical arrangement of the attributes displayed, as well as any attributes to which you can drill.  This scenario provides instructions on how to create a custom report execution page and access it though a link embedded in the contents page-section of the default MicroStrategy Web report page. However, the link to the custom page can be added to any page-section file, used either on a specific page or on the default page.

This customization uses SDK Sample Report available in the MicroStrategy Tutorial project in the Shared Reports>MicroStrategy Platform Capabilities>MicroStrategy SDK folder.

The steps listed below generate a static report on a page. For embedding report manipulation functionality, additional coding is required.

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.

  1. Execute any report. Click the hyperlink Click here to view SDK Sample Report on a new Report Execution page at the bottom of the report to view SDK Sample Report in a custom Report Execution page. When the SDK Sample Report is executed, you see the text "This is the SDK Sample Report page" at the bottom of the page.

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. Right-click the report (Report Execution) page and select Duplicate->by inheriting from this page

  5. On the Duplicate Page dialog, change the name of the new page from  CopyOfreport  to newReportPage and click OK. The new page, newReportPage (Report Execution), now appears in the list of pages. 

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

  7. Right-click the content page section and select Edit current file

  8. On the Edit Page Sectiondialog, click the Yes button to edit Report_Content.jsp/ascx

  9. A tab opens with the code for Report_Content.jsp/ascx. Add the following code at the end of the file:

    <div>

    <b>This is the SDK Sample Report page.</b>

    </div>

  10. Save your changes. 

  11. Double-click report (Report Execution). This opens the Basic Properties editor in the right frame. 

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

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

  14. On the Edit Page Section dialog, click the Yes button to edit Report_Content.jsp/ascx

  15. Add the following code at the end of the file::

    J2EE environment:

    <web:urlEvent eventID="3004" extraURL="reportID=271209CD11D3EA25C000B3B2D86C964F">Click here to view <b>SDK Sample Report</b> on a new Report Execution page

       <web:eventArgument name="3004" value="newReportPage"/>

    </web:urlEvent>

    .NET environment

    <web:urlEvent runat="server" eventID="3004" extraURL="reportID=271209CD11D3EA25C000B3B2D86C964F">Click here to view <b>SDK Sample Report</b> on a new Report Execution page

       <web:eventArgument name="3004" value="newReportPage"/>

    </web:urlEvent>

  16. Save your changes. 

  17. Execute any report. Click the hyperlink, Click here to view SDK Sample Report on a new Report Execution page, at the bottom of the report to view the SDK Sample Report in a custom Report Execution page. When the SDK Sample Report is executed, you see the text "This is the SDK Sample Report page" at the bottom of the page. 

See Also