In this section: |
This section describes how to use the -INCLUDE command to insert a report procedure (FEX) or style sheet file (STY) within another report procedure (FEX). It also describes how to use the -MRNOEDIT command to ignore code in a procedure (FOCEXEC).
Using the -INCLUDE command, you can insert a report procedure (FEX) or style sheet file (STY) within another report procedure (FEX). For information on creating report requests and creating style sheet files, see the Creating Reports with TIBCO WebFOCUS® Language manual.
When you create a report procedure in the repository content folder path, a unique path and file name reference is created, based on the folder the report is created in and the file name and type specified. Note that there are file naming rules that replace most non-alphanumeric characters and modify the file name, when necessary.
The full path is the value to specify when referencing a report procedure or style sheet file in a -INCLUDE command. The full IBFS path information, including file name, can be obtained by selecting the report and then selecting the Properties option. If the report procedure (FEX) or StyleSheet file (STY) referenced by the -INCLUDE command is contained in the same folder, you can substitute the full path name with the term ./ followed by the file name. For example:
-INCLUDE ./setup_headings.fex
Note: WebFOCUS 7.x report procedures migrated with -INCLUDE commands, coded with the 7.x Managed Reporting Repository Internal HREFs, are supported in WebFOCUS 8. This is because the WebFOCUS 7.x internal HREF references are migrated with the properties information for an item (for example, a report or style sheet file). Items created in WebFOCUS 8 must be referenced by their full IBFS path.
The following image shows the Properties dialog box for a report procedure (FEX) with the full path.
The following code illustrates how to incorporate a report procedure (FEX) using IBFS path with -INCLUDE command.
Note: A procedure or style sheet file that is located on a WebFOCUS Reporting Server can be incorporated into a Managed Reporting procedure using the -MRNOEDIT command prior to the -INCLUDE command.
-INCLUDE IBFS:/path/filename
where:
Is the full path, including filename, of the report procedure (FEX) or filename.sty of the style sheet file. The file extension is optional when a report procedure (FEX) is referenced.
If the report procedure (FEX) or StyleSheet file (STY) referenced by the -INCLUDE command is contained in the same folder, you can substitute the full path name with the term ./ followed by the file name. For example:
-INCLUDE ./setup_headings.fex
To incorporate a procedure on a WebFOCUS Reporting Server using -MRNOEDIT and -INCLUDE, enter the following:
-MRNOEDIT -INCLUDE appname/filename.ext
where:
Is the application directory path on the WebFOCUS Reporting Server in which the server procedure (FEX) or style sheet file (STY) is located. If this is not specified, the file must be on the application path of the WebFOCUS Reporting Server.
Is the name of the procedure located on the WebFOCUS Reporting Server. The file extension is optional when a report procedure (FEX) is referenced. When incorporating a style sheet file, specify the STY extension.
To incorporate a procedure located in an application directory on a WebFOCUS Reporting Server using the WebFOCUS IBFS path, enter:
-INCLUDE IBFS://EDA/nodename/appname/filename.ext
where:
Is the WebFOCUS Reporting Server node defined in the WebFOCUS Client configuration. The IBFS://EDA/ path specifies that the procedure or style sheet file is located on a WebFOCUS Reporting Server. Managing Reporting processing removes IBFS://EDA/nodename from the Managed Reporting request when submitting the request to the WebFOCUS Reporting Server because the WebFOCUS Reporting Server processing will use its application path to locate the procedure or style sheet file.
Is the application directory on the WebFOCUS Reporting Server in which the server procedure or style sheet file is located. If this is not specified, the file must be on the application path of the WebFOCUS Reporting Server.
Is the name of the procedure or style sheet file located on the WebFOCUS Reporting Server. The file extension is optional when a report procedure (FEX) is referenced. When incorporating a style sheet file, specify the STY extension.
A best practice in WebFOCUS 8 application development is to centralize report styling and environmental setup, such as JOINs and DEFINEs, by storing them in a common workspace and defining security permissions to permit users to read and run them, but not edit or change them. However, applications may require referencing report procedures and style sheet files that are located in an application directory on the WebFOCUS Reporting Server. The information in this section is for legacy applications that have been migrated.
The following is an example of incorporating a WebFOCUS Reporting Server procedure or a style sheet file within a Managed Reporting procedure using the -MRNOEDIT and -INCLUDE command.
The salesrptsetup procedure, containing the following commands to create a field commonly used in the product sales reports, is located in the /ibi/apps/ibisamp directory on the WebFOCUS Reporting Server.
DEFINE FILE GGSALES PROFIT/D12.3= DOLLARS - BUDDOLLARS; INVENTORY/D12 = UNITS - BUDUNITS; END
The salesrptstyle.sty style sheet containing the following styling commands, is located on the WebFOCUS Reporting Server in the /ibi/apps/ibisamp directory.
TYPE=REPORT,COLOR=NAVY,FONT='ARIAL',SIZE=9,GRID=OFF,$ TYPE=HEADING,LINE=1,STYLE=BOLD,SIZE=12,JUSTIFY=CENTER,$ TYPE=TITLE,BACKCOLOR=RGB(45 111 205),COLOR=WHITE,STYLE=UNDERLINE+BOLD, $ TYPE=DATA,BACKCOLOR=(WHITE RGB(235 235 255)),$ TYPE=SUBTOTAL,BACKCOLOR=RGB(163 200 236),STYLE=BOLD,$
The Managed Reporting procedure incorporates the salesrptsetup procedure and salesrptstyle style sheet located on the WebFOCUS Reporting Server.
-MRNOEDIT -INCLUDE ibisamp/salesrptsetup TABLE FILE GGSALES "Regional Inventory and Profit Report" SUM BUDUNITS UNITS INVENTORY AS 'Inventory' BUDDOLLARS DOLLARS PROFIT AS 'Profit' BY REGION BY CATEGORY ON TABLE SET STYLE * -MRNOEDIT -INCLUDE ibisamp/salesrptstyle.sty ENDSTYLE END
From the WebFOCUS Reporting Server, for each task within a schedule, ReportCaster supports receiving a single answer set, such as report, chart, or HTML file. Therefore, when using -INCLUDE to incorporate a procedure into a procedure that will be scheduled with ReportCaster, only one answer set should be created. If you need to distribute multiple reports within a single document, use the Compound Report feature. For more information, see the Creating Reports With TIBCO WebFOCUS® Language manual.
How to: |
Reference: |
You can instruct Managed Reporting to not process single lines or blocks of code using the -MRNOEDIT tag.
To instruct Managed Reporting to not process code, use the following:
For a single line of code:
-MRNOEDIT focexec_code
For multiple lines of code:
-MRNOEDIT BEGINfocexec_code -MRNOEDIT END
Note: Both lowercase and uppercase syntax are supported for the -MRNOEDIT tag. The focexec_code must fit on the same line.
The syntax above is not part of the FOCUS language. It is used only by Managed Reporting.
Managed Reporting will not process the lines when evaluating the Managed Reporting procedure prior to sending it to the WebFOCUS Reporting Server. The lines of code will be passed without the -MRNOEDIT tags to the WebFOCUS Reporting Server.
By design, amper variables specified within the -MRNOEDIT tags are resolved by Managed Reporting. You should clear the procedure property, Prompt for Parameters, if you do not want to be prompted for parameter values when:
You must also set the Managed Reporting when Prompt Parameters Property Unset to Off. For more information, see the TIBCO WebFOCUS® Security and Administration manual.
Both lowercase and uppercase syntax are supported for the -MRNOEDIT tag.
-MRNOEDIT -INCLUDE salesrptstyle.sty
Managed Reporting ignores the -INCLUDE salesrptstyle.sty command. Without the -MRNOEDIT tag, this would result in retrieval of the FOCEXEC from the WebFOCUS Repository. In this case, the -INCLUDE is resolved on the WebFOCUS Reporting Server. Therefore, salesrptstyle.sty should reside on the path of the WebFOCUS Reporting Server.
TABLE FILE GGSALES "Regional Inventory and Profit Report" SUM BUDUNITS UNITS INVENTORY AS 'Inventory' BUDDOLLARS DOLLARS PROFIT AS 'Profit' BY REGION BY CATEGORY ON TABLE SET STYLE * -MRNOEDIT -INCLUDE salesrptstyle.sty ENDSTYLE END