Web Beans

In MicroStrategy, Web Beans are simply Java beans. Beans are simply blocks of MicroStrategy data which enable you to bring MicroStrategy data onto the page.

Beans can have the following characteristics: name, type, source (including request parameters, name of enumeration constant, constant, preference, browser setting, and feature), and value.

Applications of Web Beans

Consider that your company wants to restrict the end report users from accessing the full functionality of the Report Execution page. Instead, end-users should be restricted to viewing the report results only. The steps to do this are as follows:

  1. Create a new plug-in called EmbedSingleReport
  2. Duplicate the report (Report Execution) page to create the beansExercise page
  3. Modify the first link in the exerciseLinks.jsp file so that it uses the following anchor tag:
          <a href="mstrWeb?pg=beansExercise&reportID=271209CD11D3EA25C000B3B2D8
          6C964F">Embed a Single Report on a Page</a> 
    
  4. Verify your new link by logging in to your MicroStrategy project in MicroStrategy Web, accessing the exerciseLinks page, and clicking the Embed a Single Report on a Page link
  5. After customization, clicking the first link on the exerciseLinks page displays the report

Consider that your company wants you to create a report showing the contents of two reports. That is, you need to combine the outputs of two reports into one. The steps to do this are as follows:

  1. Create a new plugin called EmbedMultipleReports
  2. Duplicate the report (ReportExecution) page to create the multipleBeansExercise page
  3. Modify the second link in the exerciseLinks.jsp file to use the following anchor tag:
          <a href="mstrWeb?pg=multipleBeansExercise&reportID=271209CD11D3EA25C0
          00B3B2D86C964F&reportID2=D1AE56B011D5C4D04C200E8820504F4F">Embed 
          Multiple Reports on a Page</a> 
    
  4. Verify your new link by logging in to your MicroStrategy project in MicroStrategy Web, accessing the exerciseLinks page, and clicking the Embed Multiple Reports on a Page link
  5. After customization, clicking the second link on the exerciseLinks page should display both the SDK Sample Report and the Call Center Timeliness report on your page:

    Applications of Web Beans

Consider that you need to refine the report created in the previous example, by making the contents of the two reports expandable and collapsible web panels, like the following:

Applications of Web Beans

The steps to do this are as follows:

  1. Under MicroStrategy Web configuration, expand Pages.
  2. Double-click multipleBeansExercise (multipleBeansExercise) to open its editor.
  3. Click the Template Properties tab.
  4. In the Template Properties Editor, under Page Templates, on the Default tab, right-click the content page section and select Edit current file.
  5. Near the middle of the file, after the </web:ifFeature> tag, add the following custom code:
          <%--Adding panel around the report bean for the first report --%> 
          <web:panel name="report1Panel" language="1" useImage="true"> 
          <web:panelTitle><B>SDK Sample Report</B></web:panelTitle> 
          <web:panelCloseInfo width="13" height="13" img="1arrow_down.gif">
          Hide Report </web:panelCloseInfo> <web:panelOpenInfo width="13" 
          height="13" img="1arrow_right.gif">Show Report </web:panelOpenInfo> 
          <web:panelContent> 
    
  6. After the next <fweb:ifBeanValue> closing tag, add the following custom code:
          </web:panelContent> </web:panel>
    
  7. Toward the bottom of the file, find the following custom HTML:
          <%--Adding new report bean for the second report --%> 
          <web:displayBean beanName="rb2"/> 
    
  8. Replace the preceding code with the following custom HTML:
          <%--Adding panel around the new report bean for the second report --
          %>
          <br><br> <web:panel name="report2Panel" language="1" useImage="true">
          <web:panelTitle><B>Call Center Timeliness</B></web:panelTitle> 
          <web:panelCloseInfo img="1arrow_down.gif">Hide 
          Report</web:panelCloseInfo><web:panelOpenInfo img="1arrow_right.gif">
          ShowReport</web:panelOpenInfo><web:panelContent><web:displayBean 
          beanName="rb2" /></web:panelContent></web:panel>
    

    Click Save.

  9. Close the Report_Content.jsp file.
  10. In Eclipse, click Restart Tomcat.
  11. In your web browser, navigate to http://localhost/MicroStrategy/servlet/mstrWeb, or your MicroStrategy web starting page.
  12. Log in to your MicroStrategy project as administrator.
  13. Click the MicroStrategy icon and select the exerciseLinks shortcut to navigate to the exerciseLinks page.
  14. Click the Embed Multiple Reports on a Page link.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset