MicroStrategy ONE

Redirecting to an external URL when a report is executed on a Folder Browsing page

This scenario shows you how to customize report links on the Folder Browsing page so that they open an external URL when they are clicked. The default behavior when you click a report on a Folder Browsing page is for the report results to be displayed within the MicroStrategy Web application. This customization is performed by creating a custom transform that generates an <a> (anchor) tag with an href attribute that directs the user to an external URL, and modifying the styles that display reports on the Folder Browsing page so that they use the custom transform. You can extrapolate from the steps in this scenario to customize other links on the Folder Browsing page or redirect to a different external URL The URL used in this scenario is the MicroStrategy web site (http://www.microstrategy.com), but you can change this to a different external URL by modifying the code.

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

Using the plug-in provided for you

The MicroStrategy SDK provides an out-of-the-box plug-in (ZIP file) that redirects report links on the Folder Browsing page to an external URL. Follow the simple steps below to deploy the plug-in and view the results in MicroStrategy Web. 

  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. Restart your web server.  

  4. Launch MicroStrategy Web to view the customization.

Creating the plug-in yourself using the Web Customization Editor

If you want to understand how the report link is customized, follow the steps below to create the plug-in and deploy it. 

  1. Launch the Web Customization Editor.  

  2. Create a new plug-in and give it a meaningful name.  

    1. On the Application Settings tab, click the Select Plug-in icon.:


    2. On the Select Plug-in dialog box, click New and enter a meaningful name for the plug-in, such as RedirectingToAnExternalURL.  

    3. Click OK.  

  3. On the Application Settings tab, expand MicroStrategy Web Configuration to view the list of settings that can be modified to perform customizations.  

    • Right-click Styles and select Create Transform to launch the Transform Creation Wizard.:

      1. On the first panel:  

        1. For Source folder, click Browse. Navigate to the src folder in your MicroStrategy project and click OK.  

        2. For Package, enter com.microstrategy.sdk.samples.transforms.  

        3. For Name, enter FolderViewTransformWithReportExternalURL.  

        4. For Transform description, enter This transform changes the anchor used for reports. The new hyperlink redirects to an external URL when a report is executed.

        5. For Superclass, enter com.microstrategy.web.app.transforms.FolderViewTransform.  

        6. Click Next.  

      2. On the second panel:  

        1. Confirm that Uncheck all methods is selected.  

        2. Click Next.  

      3. On the final panel:  

        1. Click Finish. FolderViewTransformWithReportExternalURL.java opens in the editor.  

        2. To redirect to an external URL when a report is executed, you override the generateAnchor(WebEvent event) method, and make other modifications as required. A sample file, FolderViewTransformWithReportExternalURL.java, with all the code needed for this customization has been provided for you. Open the file, copy all of the code, and paste it into the FolderViewTransformWithReportExternalURL.java file that is open for editing.  

        3. Save your changes.  

    • Expand Styles to view the list of styles used in MicroStrategy Web.:

      1. Double-click FolderStyleIcon to open the Style Properties Editor.  

        1. On the Style Properties tab, for Transform, click Change.  

        2. Begin entering the name of the transform you created (FolderViewTransformWithReportExternalURL), then select it from the Matching items below, and click OK.  

        3. Save your changes.  

      2. Double-click FolderStyleList to open the Style Properties Editor.  

        1. On the Style Properties tab, for Transform, click Change.  

        2. Begin entering the name of the transform you created (FolderViewTransformWithReportExternalURL), then select it from the Matching items below, and click OK.  

        3. Save your changes.  

  4. A new plug-in folder, with the name you gave it, now exists in the plugins folder of your MicroStrategy Web installation directory. Restart your web server to apply the plug-in.  

  5. Launch MicroStrategy Web to view the customization.