How to: |
You can integrate WebFOCUS reports with maps by:
Latitude and longitude values can be passed as a parameter from a map to update a WebFOCUS procedure. Latitude and longitude are sent as a pair of values, and HTML Composer uses a specific parameter, &COORDINATES, to parse the value pairs correctly.
By adding a drill down to a map, you can filter a WebFOCUS report by the latitude and longitude coordinates of the selected marker(s). The parameter to pass the longitude and latitude values must be called &COORDINATES. This HTML Composer parameter will parse the Latitude and Longitude as paired data sets.
The following example updates a WebFOCUS report based on a map location by:
The cursor changes into a crosshair.
The Procedure Viewer opens.
Tip: The Century Sales and Locale data sources are available from the Master Files folder in the ibidemo application folder. You may copy these source files to the project directory of your choice.
The Open dialog box appears.
The Join dialog box opens.
The File Description List for the Join dialog box opens.
Developer Studio automatically creates a Join between the data sources if they both have fields with the same formats. The Join tool displays both data sources and the default Joins, as shown in the example image below.
For more information about using the Join tool, see the Creating Reporting Applications With Developer Studio manual.
The Join is added to the Procedure Viewer.
The Open dialog box appears.
Report Painter opens.
The Variable Editor opens.
The Expression Builder opens.
You are returned to HTML Composer where the New Parameters dialog box appears.
You will not need a control for the &COORDINATES parameter because the parameters will be passed by the map.
The Revenue by Category report appears in HTML Composer.
Click the markers on the map to update the report based on the location selected, as shown in the image below.
A JavaScript function is used in a WebFOCUS report to update a map. The JavaScript function panToPoint automatically scrolls the map to a specified Latitude and Longitude. In addition, the zoom level of the map can be specified. This will overwrite the zoom level set by default.
The following example updates a map based on data in a report by:
This JavaScript function requires the following parameters (in the table below) in this order. Each parameter can be set to a Field, Constant Value or a Variable.
Parameters |
Drill Down Parameter Value |
---|---|
LATITUDE |
The latitude value. |
LONGITUDE |
The longitude value. |
Unique Identifier |
The Unique Identifier for the targeted map object. |
Zoom Level |
Numeric value between 0 and 18. |
The cursor changes into a crosshair.
The Procedure Viewer opens.
Tip: The Century Sales and Locale data sources are available from the Master Files folder in the ibidemo application folder. You may copy these source files to the project directory of your choice.
The Open dialog box appears.
The Join dialog box opens.
The File Description List for Join dialog box opens.
Developer Studio automatically creates a Join between the data sources if they both have fields with the same formats. The Join tool displays both data sources and the default Joins, as shown in the example image below.
For more information about using the Join tool, see the Creating Reporting Applications With Developer Studio manual.
The Join is added to the Procedure Viewer.
The Open dialog box appears.
Report Painter opens.
The StyleSheet Selection box opens.
The selected Style Sheet is added to the Include StyleSheet File section.
The StyleSheet is applied to the report.
The Field Properties dialog box opens at the Style tab.
The Drill Down Parameter dialog box opens.
Note: The name of the map object in HTML Composer is mapcontrol1.
The following image is an example of the Field Properties Drill Down tab with these options added.
The Field Properties dialog box opens at the Style tab.
The Drill Down Parameter dialog box opens.
Note: The name of the map object in HTML Composer is mapcontrol1.
The report appears in HTML Composer.
The map and the report appear in the output. Click a drill-down link from the report. The map updates according to the location selected from the report.
For example, click on a link in the Country column to zoom and navigate to the selected country at the zoom level illustrated. Or click on a link in the State column to zoom and navigate to the selected state at the zoom level specified.
WebFOCUS |