MicroStrategy ONE

Displaying Reports in a PDF Format

When you click a report link on a Folder Browsing page, the default behavior is for the report data to be displayed within MicroStrategy Web as a grid or a graph.

In this customization scenario, you modify the event associated with clicking a report link on a Folder Browsing page so that the default behavior is for the report data to be displayed in PDF format. Thus, clicking a report displays the PDF Options page. You can use the code in the sample transform class used in this scenario as a guide for how to change the default behavior to some other desired action.

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. Access the Transform Creation Wizard

  3. Click Browse... next to the Source folder text field to select the src folder and click OK

  4. Enter the following information for the rest of the text fields.:

    Package: com.microstrategy.sdk.samples.transforms
    Name
    : FolderViewTransformWithExportLinks
    Transform description
    : This transform changes the event used for executing a report. The new hyperlink displays the report as PDF instead of executing it.
    Superclass
    : com.microstrategy.web.app.transforms.FolderViewTransform 

  5. Click Next

  6. Click the radio button for Uncheck all methods

  7. Click Next

  8. Click Finish. FolderViewTransformWithExportLinks.java opens in the editor. 

  9. For this scenario, you override the getEvent(WebObjectInfo object) method, and make other modifications as required. The sample, FolderViewTransformWithExportLinks.java, contains the entire code for this custom transform. You can use this code in FolderViewTransformWithExportLinks.java that is open for editing. 

  10. Save your changes. 

  11. Click on Styles in the Web Customization Editor to expand the list of styles used in MicroStrategy Web. 

  12. Double-click the FolderStyleIcon style. 

  13. Click the Change button next to the Transform text field. 

  14. Enter the name of the transform you created (FolderViewTransformWithExportLinks), select it from the Matching Types results and click OK

  15. Save your changes. 

  16. Double-click the FolderStyleList style. 

  17. Click the Change button next to the Transform text field. 

  18. Enter the name of the transform you created (FolderViewTransformWithExportLinks), select it from the Matching Types results and click OK

  19. Save your changes. 

  20. Launch MicroStrategy Web to view the customization.