In this section: |
You can use a JavaScript function to dynamically navigate to other pages within your Designer portal, and immediately filter them based on the value that you select. This feature is especially useful in portals that contain multiple portal pages, because it allows you to link to a specific page within it. You can also pass a parameter from a link in the source item to filter the content in the target page, such as charts or reports, to quickly navigate through and show related information in different areas of your portal.
To use the navigateToPage function to jump from one page in a portal to another, perform the following tasks:
How to: |
In this stage, you build parameterized reports and charts that will serve as the targets for drill-down links in the source report that you will create later.
It is prudent to build this content before creating the source report for a couple of reasons. First of all, these content items generally show detailed information that expands upon the information in the report. You can decide upon the information that you want to show in these target items, and how they should be filtered. Additionally, when you create the drill-down links in the source report, you will need to provide the parameter that you want to pass to these target items, and include the associated field in the source report. You will also need to include the IBFS path to the page that contains these target items. Therefore, it will be easier to create the target items and add them to a page in the portal first, then add the source report that targets them to a new page in the same portal.
WebFOCUS Designer opens.
You will also add this field to the source report later, and create a drilldown to pass a selected value from the source report to the parameterized content that you are creating now. You do not need to select default filter values.
Optionally, you can also click Convert to Page and then add new containers to create additional charts and reports in the same page on demand. If you choose to create new content directly within a page using this authored page workflow, skip steps 3 through 6 in Stage Two.
How to: |
In this stage, you will create a portal to which you will add a page containing the target content that you created previously.
On the WebFOCUS Hub, in the Workspaces area, select the folder in which you want to create your portal, then, in the +Content menu, point to Application, and then click Portal.
Click Create to create the portal.
WebFOCUS Designer opens.
Once you select a page template, the page canvas opens.
Select the Filters tab on the sidebar and then click Add all filters to page.
Controls for all parameters are added to the Filter toolbar.
How to: |
In this stage, you will create a simple report with hyperlinks that point to the target page in the portal.
WebFOCUS Designer opens.
This report will contain drilldowns that pass parameter values to those target items, opening and filtering the page containing them when a link is clicked.
After you select a data source, the WebFOCUS Designer canvas loads.
In this example, we will create a report, since drill-down links in reports appear as easily identifiable hyperlinked text values. Therefore, we will select either the grid or standard report content type. However, you can add drilldowns to any standard chart type as well. Drilldowns added to charts are available from tooltips when you point to an area of the chart.
Make sure to add the field by which the target items are filtered to the Rows bucket.
If you added filters for multiple different fields to your target items, add the drilldowns to the lowest level sort field. Associated values for higher level sort fields will be included automatically.
Click the plus sign button in the Request Parameters section to add the first parameter.
You can acquire the IBFS path of the page by right-clicking it in the object explorer on the WebFOCUS Hub clicking Properties. Copy the text in the Path field of the Properties panel, then paste it into the Field/Value column for the second drilldown parameter in the Configure Drill Downs dialog box in WebFOCUS Designer.
Typically, the parameter name matches the name of the field. You can confirm the parameter name by opening the target page in WebFOCUS Designer, clicking the Info button, and noting the parameters listed in the Parameters/Filters category for the items on the page. Alternatively, select a filter control on the page and, on the Settings tab, scroll down to the Parameters section, which shows the name of the parameter associated with the filter control.
The following image shows the parameters to drill to a page in a portal, passing values for both the PRODUCT_CATEGORY and TIME_YEAR parameters.
The hyperlinks are added to the entries of the selected field.
Note: The links remain inactive until the drilldown source report or chart is added to a page within the same portal as the target item.
How to: |
The drilldown source report or chart should be run within the same portal as its target item. Therefore, it should be added to a page within that same portal.
WebFOCUS Designer opens.
Once you select a page template, the page canvas opens.
Alternatively, you can save the page to another location in your Repository, and instead create a shortcut to that page within the portal folder structure.
The Properties panel opens.
Items with lower sort order values appear first. Since we want the page with the drilldown source report to appear first, type a negative value, such as -1, into the Sort order text box, causing it to appear before items with the default sort order of 0.
How to: |
The portalDispatch JavaScript function is defined in a .js file in your WebFOCUS installation. In order for WebFOCUS to find and execute this function, you must configure the path on the WebFOCUS Reporting Server edasprof.prf profile using the JSURLS property. Properties set in edasprof.prf are applied to any procedures run against that WebFOCUS Reporting Server.
Alternatively, navigate to the WebFOCUS Reporting Server browser interface using the URL:
hostname:HTTPport
where:
Is the name of the machine where the WebFOCUS Reporting Server is hosted.
Is the HTTP(S) port number. If running against HTTP, the default value is 8121.
When running locally, the default address of the WebFOCUS Reporting Server browser interface is localhost:8121.
In the Reporting Server browser interface, open the Tools menu , and click Workspace.
SET JSURLS = '/ibi_apps/tools/portalcanvas/iframeinterface.js'
Note: If your environment does not use the default context root, replace the ibi_apps context root in the JSURLS path above with the one used in your environment.
Once added, your environments edasprof.prf file may resemble the following image.