Drilling Down to a Managed Reporting Procedure From a ReportCaster Distributed Report
by Susan Trommer
Is there a way to drill down from a ReportCaster distributed report to a Managed Reporting procedure? This is a frequently asked question and a popular new feature request for which we have designed a solution with the assistance of WebFOCUS programming. The solution can be manually coded, but the WebFOCUS 7.6.1 release will eliminate the need for the manual coding technique in most scheduled and distributed Managed Reporting reports.
The manual coding solution is to code the FOCEXURL environmental SET command within the Managed Reporting procedure (FEX) that will be scheduled. If this sounds familiar, you are probably recalling the “Drilling Down from a Managed Reporting Procedure to a WebFOCUS Server Procedure” article I wrote back in the (month?) 2005 WebFOCUS Newsletter, which provided information on the usage of the environmental SET variable FOCEXURL. The FOCEXURL environment SET parameter specifies the URL to submit when a drill down is selected. The difference in this article is that the value of FOCEXURL must include a few Managed Reporting specific parameters.
Following is a well-commented working code example for setting the value of FOCEXURL to successfully drill down to a Managed Reporting procedure. This technique requires that all the drill downs included in the report be located in the same Managed Reporting domain.
Layout note: Do not break up the following lines. If you have to, add -* to the beginning of the line and indent appropriately to maintain the flow of explanation)
* How to set the value of FOCEXURL for navigation back to WF Client
-* and MR context for execution of the drill down request. Must be
-* coded using- concatenation so that WF describe (auto prompting) is not
-* invoked and for character encoding in the URL to be done correctly.
-*
-* 1. Protocol, host and port to submit URL to. Do not use ‘localhost’ for
-* the host value!
-SET &FOCEXURL='http://trommer-xp:8080';
-*
-* 2. Call to WF Client (/ibi_apps is the default URL context, can be customized).
-SET &FOCEXURL=&FOCEXURL | '/ibi_apps/WFServlet?IBIF_webapp=/ibi_apps' | '&';
-*
-*3. If the report contains a drilldown to an MR procedure the following
-* parameters are required.
-* a. Set WF Reporting Server to run request.
-SET &FOCEXURL=&FOCEXURL | 'IBIC_server=EDASERVE' | '&';
-*
-* b. Set whether the message viewer feature is on or off. The message
-* viewer shows a frame below the report containing any informational
-* or FOC messages from WF Reporting Server
-SET &FOCEXURL=&FOCEXURL | 'IBIWF_msgviewer=OFF' | '&';
-*
-* c. IBIMR_drill tells WF client subsequent request is a drill down and the
-* information after IBIMR_drill=X, is the HREF of the MR domain that
-* the drill down FEX is located in. The HREF of the MR domain can be
-* obtained by selecting the Properties option for the domain the drill
-* down report is located in.
-SET &FOCEXURL=&FOCEXURL | 'IBIMR_drill=X,domainwn/domainwn.htm'| '&';
-*
-* 4. Issue the SET command to assign the value within &FOCEXURL to
-* the FOCEXURL environmental variable.
SET FOCEXURL='&FOCEXURL'
-*
TABLE FILE CAR
SUM CAR.BODY.SALES
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=CAR.ORIGIN.COUNTRY,
FOCEXEC=domainwn/app/carmodel.fex,
$
ENDSTYLE
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END
The procedure code this sample is drilling down to (te1pmxwe/app/carmodel.fex) is as follows:
TABLE FILE CAR
SUM CAR.SPECS.MPG
CAR.SPECS.RPM
CAR.BODY.SEATS
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
BY CAR.BODY.BODYTYPE
ON TABLE SET HTMLCSS ON
ON TABLE NOTOTAL
END
The Release 7.6.1 ReportCaster enhancement calls for the Distribution Server to utilize the information it receives from the WebFOCUS Client for a Managed Reporting procedure to set the values of FOCEXURL and also FOCHTMLURL.
For each scheduled Managed Reporting procedure and WF Server procedure the Distribution Server creates a procedure (FOCEXEC) that is submitted to the WebFOCUS Reporting Server specified in the schedule information. Only Managed Reporting procedures will have the FOCEXURL and FOCHTMLURL values added because the Distribution Server does not communicate with the WF Client to run scheduled WF Server procedures.
The FOCEXURL value the Distribution Server sets does not include the protocol, host and port information. This is because the WbeFOCUS Client protocol, host and port information the Distribution Server has in the ReportCaster “Repository Node” configuration variable may not be the same protocol, host and port the user viewing the ReportCaster distributed report to which the user needs to submit the Managed Reporting drill-down report.
An example is when the security infrastructure is utilizing proxy servers that change the host and port information of the request. This is when the value of FOCEXURL will need to be manually coded in the Managed Reporting request, as shown in the code example earlier.
The command SET FOCHTMLURL is used to access resources that reside under the ibi_html alias and provide the WebFOCUS Reporting information with the value to access WebFOCUS reporting resources/features that reside on the web/application server tier under /ibi_html directory.
For example:
SET FOCHTMLURL = http://hostname:[port]/ibi_html
Where:
hostname:[port]is the host name and optional port number (specified only if you are not using thedefault port number) where the WebFOCUS Web application is deployed.
ibi_html is the site-customized Web server alias pointing to the WebFOCUS71/ibi_html
directory. ibi_html is the default value.
When manually coding the value of FOCEXURL or FOCHTMLURL, what is most important to evaluate is the context in which the user receives the report and what the protocol, host and port values need to be for the user to connect to the client to run the drill-down request.
If the report is distributed to the Report Library or back to Managed Reporting, the protocol, host and port do not need to be coded in the FOCEXURL value because the user logs on to the Report Library or Managed Reporting, which sets the application context. It is when the report is distributed using e-mail or FTP that the application context needs to be carefully evaluated.
The SET commands coded in the Managed Reporting procedure as executed after the SET commands that the Distributed Server adds to the procedure (FOCEXEC) submitted to the WebFOCUS Server so the value of FOCEXURL and FOCHTMLURL coded in the Managed Reporting procedure will override the SET commands added by the Distribution Server.
So go ahead and review your scheduled Managed Reporting procedures and evaluate existing drill-downs or consider adding drill-downs to Managed Reporting procedures to provide deeper analytical capabilities from your distributed reports.

