Displaying Multiple Reports on a Single Custom Report Page

There may be instances when you want to display more than one report on a single report page. In this scenario, you create a custom Report Execution page that displays two reports on the same page at the same time.

 

Once you have performed this customization, you can see the results using a URL that invokes the custom Report Execution page and passes two report IDs. This customization uses two reports that are available in the MicroStrategy Tutorial project in the Shared Reports>MicroStrategy Platform Capabilities>MicroStrategy SDK folder.

 

Note: Because the normal report page was designed to contain a single report (for example, it has only one toolbar), you may notice that the behavior for these two reports is somewhat odd. If you wish to extend this sample or achieve appropriate behavior in your application, there are several options. One option is to simply modify this page to remove the toolbar and other interactivity. (See Displaying only the Report Name and Content in a Portal iFrame for further information on how to do this.)  Another option is to use an HTML or Report Services document to achieve similar behavior. In either of these cases, the out-of-the-box MicroStrategy Web page handles the appropriate interactivity automatically. Finally, you can extend this page to host two toolbars and support appropriate interactivity. While this third option is possible, creating the code required to accomplish it is beyond the scope of this simple sample.

 

After customization:

 

displaymultiplereports.gif

 

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 the plugins folder 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.

 

  1. Extract the plug-in to the plugins subfolder inside the MicroStrategy Web installation folder.
     

  2. Launch MicroStrategy Web to view the customization.
     

  1. Use the following URL:
    JSP: http://WebServerName/MicroStrategy/servlet/mstrWeb?Server=IntelligenceServerName&Project=MicroStrategy+Tutorial&Port=0&evt=4001&src=mstrWeb.customReportPage.4001&reportID=271209CD11D3EA25C000B3B2D86C964F&reportID2=2DA151E14F2F906EBBDC2F8F4546D032.

    ASP .NET: http://WebServerName/MicroStrategy/asp/Main.aspx?Server=IntelligenceServerName&Project=MicroStrategy+Tutorial&Port=0&evt=4001&src=Main.aspx.customReportPage.4001&reportID=271209CD11D3EA25C000B3B2D86C964F&reportID2=2DA151E14F2F906EBBDC2F8F4546D032.

 

 

Note: Refer to Applying customization changes to the application for instructions on specific settings that affect whether the customization changes are applied automatically or a restart of the Web server is required.

 

 

 

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. The new page is titled CopyOfreport (Report Execution).
     

  5. Enter customReportPage in the Name text field for the CopyOfreport (Report Execution) page.
     

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

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

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

  9. Add the following code at the end of the file:
    JSP
    :

<%--Adding new report bean for the second report --%>

<web:displayBean bean="rb2"/>

 

ASP .NET:

<%--Adding new report bean for the second report --%>

<web:displayBean runat="server" bean="rb2"/>

 

  1. Save your changes.
     

  2. Navigate back to customReportPage (Report Execution) and click on Beans to expand the list of beans used by the new customReportPage (Report Execution) page.
     

  3. Right-click on frame (Type=ReportFrameBean) and select New Bean to launch the New Web Bean Wizard.
     

  4. Enter the following information:
    Name
    : rb2
    System Bean
    : ReportBean
    Persist Mode
    : Request
     

  5. Click Next.
     

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

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

  8. Select initialization parameters: graphBeanName, maxWait and pollingFrequency, and click >>.
     

  9. Click Next.
     

  10. Select request parameters: filterID, messageID, objectID, stateID, templateID, useCaches and viewMode and click >>.
     

  11. Click Next.
     

  12. Click Finish. The new bean rb2 gets added as a child bean under  frame (Type=ReportFrameBean).
     

  13. Click rb2 to view the bean details in the Bean Properties editor.
     

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

 

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

 

  1. In the Bean Styles panel, click Add.
     

  2. Select HierarchicalTreeElements, PromptsTransformClassic and  ReportGridStyle and click >> to add the styles.
     

  3. Click OK.
     

  4. Save your changes.
     

  5. Launch MicroStrategy Web and view the customization using the following URL:
    JSP: http://WebServerName/MicroStrategy/servlet/mstrWeb?Server=IntelligenceServerName&Project=MicroStrategy+Tutorial&Port=0&evt=4001&src=mstrWeb.customReportPage.4001&reportID=271209CD11D3EA25C000B3B2D86C964F&reportID2=2DA151E14F2F906EBBDC2F8F4546D032.

    ASP .NET: http://WebServerName/MicroStrategy/asp/Main.aspx?Server=IntelligenceServerName&Project=MicroStrategy+Tutorial&Port=0&evt=4001&src=Main.aspx.customReportPage.4001&reportID=271209CD11D3EA25C000B3B2D86C964F&reportID2=2DA151E14F2F906EBBDC2F8F4546D032.

 

 

Note: Refer to Applying customization changes to the application for instructions on specific settings that affect whether the customization changes are applied automatically or a restart of the Web server is required.

 

 

See also

 

 

 

 

Feedback: If you have any feedback on this customization scenario or would like to see a scenario added to the MSDL, please send an e-mail to documentationfeedback@microstrategy.com.