Building a Logon Page and Displaying the Domain Tree and Reports

How to:

This topic describes how to build a Managed Reporting logon page and display the Managed Reporting domain tree and reports in a Flex application.


Top of page

x
Procedure: How to Build a Logon Page and Display the Domain Tree and Reports
  1. In Flex Builder, create a new project and name it My_Second_Project.
  2. Drag the ibiCanvas component onto the design pane.
  3. Set the layout constraints for the ibiCanvas component so that it matches the application size, as shown in the following image.

    ibiCanvas component in design pane

  4. Drag the ibiMREsignon component onto the ibiCanvas.
  5. Set the id property of the ibiMREsignon component to mre.
  6. Set the ibiMreHost property to the URL for your Managed Reporting host, for example:
    http://localhost:8080
  7. Set the ibiOnSignonPass property to onPass. This property refreshes the Managed Reporting domains if logon is successful.
  8. To create the onPass function, enter the following ActionScript within the <mx:Application> start and end tags, and within <mx:Script> start and end tags. The code CDATA is required at the beginning of the ActionScript section.
    <mx:Script>
       <![CDATA[
          public function onPass():void
          {
            domains.refreshDomains();
          }
       ]]>
    </mx:Script>
  9. Select and drag the ibiMREdomains component onto the canvas. This is a composite component that contains the domain tree and the different report folders for Managed Reporting. You can use a separate component to design a custom view. For example, the component ibiMREmyReport displays only My Reports.
  10. Set the ibiMREdomains id property to domains.
  11. Set the ibiMreParent property to MRE. The ibiMREdomains component is a child of the ibiMREsignon component.
  12. Run the application. When logon is successful, the domains are displayed in the component.
  13. Click a domain in which you have Standard Reports. The reports are displayed in the corresponding report tab. The right-click menu has the familiar options for running reports from Managed Reporting.

    Right-click context menu

  14. You may optionally add a button to refresh the contents of the ibiMREdomains component. From the Controls component folder, select the Button control and drag it onto the canvas.
  15. Set the button id to Button2.
  16. Set the button label to Refresh.
  17. In the MXML code in Source view, enter a click event within the button tags.
    click="domains.refreshDomains()"

WebFOCUS