In this section: |
|
The WebFOCUS amper auto-prompting facility enables you to create a launch page that prompts users for the amper variables necessary to execute a procedure. You can also design the launch page that will prompt for the amper variables.
With auto-prompting, you can add descriptions of procedures and variables, headings, default variable values, and static or dynamic lists. You can also select parameters and run a report while still being able to view and change your parameter selections. You can also display and hide parameters to widen the screen as needed.
You can even create a launch page that prompts users to select fields and then use these selections as the objects of the display and sort commands in the report request.
The following image shows a launch page that prompts you to select parameter values.
Note: The list controls in the autoprompt form display in the order the amper variables are coded in the procedure (FOCEXEC).
After you run the report, the output appears as shown in the following image:
From the amper-auto prompting launch page, you have the following options:
Option |
Description |
---|---|
Run |
Click this button to run the report. |
Reset |
Click this button to reset the parameter selections. |
Clear Output |
Click this button to clear the report output area. |
Run in a new window |
Select this check box to open the report in a new browser window. |
Hide/Show Parameters |
Double-click splitter bar to hide parameters for full screen report view. Double-click splitter bar again to return to the original parameters and report view. |
The following are important amper auto-prompting issues to consider:
TABLE FILE MOVIES HEADING PRINT MOVIES.MOVINFO.TITLE MOVIES.MOVINFO.COPIES BY MOVIES.MOVINFO.RATING BY MOVIES.MOVINFO.CATEGORY WHERE MOVIES.MOVINFO.RATING EQ &RATING.(OR(<General Audience,G>, <Not Rated,NR>,<Parental Guidance,PG>,<PG Over 13,PG13>,
<R Over 8,R>)).Select Favorite &| Desired Rating.;
ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT,$ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9,$ TYPE=TITLE, STYLE=BOLD,$ TYPE=HEADING, SIZE=12, STYLE=BOLD,$ ENDSTYLE END
All Dialogue Manager variables referenced within the -HTMLFORM BEGIN and -HTMLFORM END commands are evaluated, even within comment tags. If you do not want any variables to be evaluated, you can specify the NOEVAL option (-HTMLFORM BEGIN NOEVAL). If you want to mix-and-match WebFOCUS variables (which you want to prompt for, such as &COUNTRY) and HTML special variables, do not use the NOEVAL option. Either assign each variable a default value or escape the ampersand symbol using a pipe character (|) so that the ampersand symbol is not interpreted as the start of a variable name. For example, in the following sample, the ampersand is escaped using the pipe character so that the variable definition in the comment is not evaluated:
-HTMLFORM BEGIN <HTML> <BODY> HELLO &|nbsp &COUNTRY </BODY> </HTML> -HTMLFORM END
How to: |
Note: The examples in the following topics are built on the preceding examples, and the code representing the concept being illustrated is shown in bold.
You can add a description of the procedure that provides information about the form, or what the purpose of the procedure is. The code that adds a description must be added before the report request. This is useful when the procedure is part of a Web service.
-<description>text</description>
where:
Is the description of the procedure. If the description requires multiple lines, you must repeat the <description> and </description> tags.
The following provides a description of the procedure. Note that this tag is only visible in the returned XML code.
-<description>This procedure reports on Inventory </description>
-<description>by state, storename and product name. </description>
TABLE FILE CENTORD SUM QTY_IN_STOCK BY STATE BY STORENAME BY PRODNAME ON TABLE SUBHEAD "Inventory Report" WHERE STATE EQ '&STATE' WHERE STORENAME EQ '&STORENAME' WHERE PRODNAME EQ '&PRODNAME' END
How to: |
You can add a heading to the form that explains to the user what information they need to provide. The code that adds a heading must be added before the report request.
Note: This functionality is available only when the launch page template is set to autoprompt_simple. For more information, see Customizing the Amper Auto-Prompting Facility.
-<heading> text </heading>
where:
Is the heading that will display on the form.
The following provides a textual prompt for the form.
-<description>This procedure reports on Inventory </description> -<description>by state, storename and product name. </description>
-<heading> Please specify a state, storename and product name: </heading>
TABLE FILE CENTORD SUM QTY_IN_STOCK BY STATE BY STORENAME BY PRODNAME ON TABLE SUBHEAD "Inventory Report" WHERE STATE EQ '&STATE' WHERE STORENAME EQ '&STORENAME' WHERE PRODNAME EQ '&PRODNAME' END
How to: |
You can add a description of a variable that will replace the variable name in the form that prompts the user for a value. The description is appended to the variable name in the WHERE or IF expression of the report request.
'&variable.description.'
where:
Is the variable name, including the ampersand (&), whose value is being prompted for.
Is a description of the variable that replaces the variable name in the prompt.
Note: The following are usage limitations for description values:
The following provides a more descriptive name for the STATE, STORENAME, and PRODNAME fields within the form. The field descriptions will precede the field controls on the auto-prompt form.
-<description>This procedure reports on Inventory </description> -<description>by state, storename and product name. </description> -<heading> Please specify a state, storename and product name: </heading> TABLE FILE CENTORD SUM QTY_IN_STOCK BY STATE BY STORENAME BY PRODNAME ON TABLE SUBHEAD "Inventory Report" WHERE STATE EQ '&STATE.2 letters for US State.' WHERE STORENAME EQ '&STORENAME.Store Name.' WHERE PRODNAME EQ '&PRODNAME.Product Name.' END
How to: |
You can set a default variable value. This value will be used in the report if one is not supplied by the user. The code that specifies a default variable value must be added before the report request.
-DEFAULT variable=value
where:
Is the variable, including the ampersand (&), for which you are setting a default value.
Is the default value for the variable.
The following sets a default value of NY for the STATE field. Note that there must be an ampersand in front of the field name in the -DEFAULT command for the amper variable to contain a default attribute in the form.
-<description>This procedure reports on Inventory </description> -<description>by state, storename and product name. </description> -<heading> Please specify a state, storename and product name: </heading>
-DEFAULT &STATE=NY
TABLE FILE CENTORD SUM QTY_IN_STOCK BY STATE BY STORENAME BY PRODNAME ON TABLE SUBHEAD "Inventory Report" WHERE STATE EQ '&STATE.2 letters for US State.' WHERE STORENAME EQ '&STORENAME.Store Name.' WHERE PRODNAME EQ '&PRODNAME.Product Name.' END
How to: |
Dialogue Manager variables can be given default values using the -DEFAULT command. These variables are returned in the XML describe information used for WebFOCUS parameter prompting features (Amper Autoprompt, MR Publish Utility, HTML Composer, and ReportCaster Scheduling).
You can initialize a variable value and prevent it from being used for WebFOCUS parameter prompting by using the -DEFAULTH command. Variables initialized with -DEFAULTH are not used for parameter prompting. Since these variables are not displayed by the parameter prompting features, they are hidden from the user.
The code that specifies a default variable value must be added before the report request.
How to: |
You can add a single-select list of values. The values in the list can be static or dynamic.
'&variable.(value,value2[,value3][,value4]...).[description.]'
where:
Is the variable, including the ampersand (&), for which you are supplying a list of values.
Are the values comprising the list of selectable variable values.
Is an optional description of the variable. For details and restrictions, see Adding a Variable Description to the Form.
The following provides a list of values that are valid for the STORENAME field. The user can select only one value from the list.
-<description>This procedure reports on Inventory </description>
-<description>by state, storename and product name. </description>
-<heading> Please specify a state, storename and product name: </heading>
-DEFAULT &STATE=NY
TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY STORENAME BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2 letters for US State.'
WHERE STORENAME EQ '&STORENAME.(eMart,TV City,Web Sales).Store Name.'
WHERE PRODNAME EQ '&PRODNAME.Product Name.'
END
'&variable.(FIND return_fieldname [,display_fieldname] IN datasource).[description.]'
where:
Is the variable, including the ampersand (&), for which you are supplying a list of values.
Is the name of the field containing the possible variable values that are returned to the FOCEXEC.
Is the name of the field containing the possible variable values that are displayed in the auto-prompt form.
Note: Both return_fieldname and display_fieldname can be a DEFINE field in an MFD (Master File Description), but not a DEFINE field in a procedure.
Is the data source that contains the fields specified in return_fieldname and display_fieldname. If the fields reside in a cross-reference file of a data source used in a join, use the data source name that contains the fields.
Note: For dynamic lists, the WF Client constructs the request to obtain the values using the specified data source. All environmental commands, such as SET commands, needed to obtain the values from the specified data source must be issued in the WebFOCUS Server profile, user profile, or WebFOCUS Client profile.
Is an optional description of the variable. For details and restrictions, see Adding a Variable Description to the Form.
The following provides a list of values that are valid for the product name field. This list is populated with values from the CENTORD data source. The user can select only one value from the list.
-<description>This procedure reports on Inventory </description>
-<description>by state, storename and product number. </description>
-<heading> Please specify a state, storename and product name: </heading>
-DEFAULT &STATE=NY
TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY STORENAME BY PROD_NUM
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2 letters for US State.'
WHERE STORENAME EQ '&STORENAME.(eMart,TV City,Web Sales).Store Name.'
WHERE PROD_NUM EQ '&PROD_NUM.(FIND PROD_NUM,PRODNAME IN CENTORD).Product Name.'
END
How to:
Reference: |
You can add a multi-select list of values. The values in the list can be static or dynamic.
&variable.({AND|OR}(<displayvalue1,value1>, <displayvalue2,value2>,...<displayvalueN,valueN>)).[description.]
where:
Is the variable, including the ampersand (&), for which you are supplying a list of values.
Are the values comprising the list of selectable variable values that you can select.
Are the values comprising the list of selectable variable values passed to the reporting server.
Is an optional description of the variable. For details and restrictions, see Adding a Variable Description to the Form.
The following provides a list of values that are valid for the STORENAME field. The user can select more than one value from the list.
-<description>This procedure reports on Inventory </description>
-<description>by state, storename and product name. </description>
-<heading> Please specify a state, storename and product name: </heading>
-DEFAULT &STATE=NY
TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STATE BY STORENAME BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STATE EQ '&STATE.2 letters for US State.'
WHERE STORENAME EQ &STORENAME.(OR(eMart,TV City,Web Sales)).Store Name.
WHERE PRODNAME EQ '&PRODNAME.Product Name.'
END
&variable.({AND|OR}(FIND return_fieldname [,display_fieldname] IN datasource)).[description.]
where:
Is the variable, including the ampersand (&), for which you are supplying a list of values.
Is the name of the field containing the possible variable values that are returned to the FOCEXEC.
Is the name of the field containing the possible variable values that are displayed in the auto-prompt form.
Note: Both return_fieldname and display_fieldname can be a DEFINE field in an MFD (Master File Description), but not a DEFINE field in a procedure.
Is the data source that contains the fields specified in return_fieldname and display_fieldname. If the fields reside in a cross-reference file of a data source used in a join, use the data source name that contains the fields.
Note: For dynamic lists, the WF Client constructs the request to obtain the values using the specified data source. All environmental commands, such as SET commands, needed to obtain the values from the specified data source must be issued in the WebFOCUS Server profile, user profile, or WebFOCUS Client profile.
Is an optional description of the variable. For details and restrictions, see Adding a Variable Description to the Form.
The following provides a list of values that are valid for the state field. This list is populated with values from the CENTORD data source. The user can select more than one value from the list.
-<description>This procedure reports on Inventory </description>
-<description>by store code, state and product name. </description>
-<heading> Please specify a storename, state and product name: </heading>
TABLE FILE CENTORD
SUM QTY_IN_STOCK BY STORE_CODE BY STATE BY PRODNAME
ON TABLE SUBHEAD
"Inventory Report"
WHERE STORE_CODE EQ &STORE_CODE.(OR(FIND STORE_CODE,STORENAME
IN CENTORD)).Store Name.
WHERE STATE EQ &STATE.(OR(CA,IL,MA,NY,NJ,FL,TX)).2 letters for US State.
WHERE PRODNAME EQ '&PRODNAME.(FIND PRODNAME IN CENTORD).Product Name.'
END
&variable.(FROM Range1 TO Range2).
where:
Is the numerical variable, including the ampersand (&), for which you are supplying a list of values.
Is the starting numerical value of the range of list of values.
Is the ending numerical value of the range of list of values.
The following provides a list of numerical values that are valid for the QTY_IN_STOCK field. This list is populated with values from the CENTORD data source that fall within the range.
-<description>This procedure reports on Inventory </description> -<description>by state, storename and product name. </description> -<heading> Please specify a state, storename and product name: </heading> TABLE FILE CENTORD SUM QTY_IN_STOCK BY STATE BY STORENAME BY PRODNAME ON TABLE SUBHEAD "Inventory Report" WHERE QTY_IN_STOCK GT &STOCK.(FROM 5000 TO 10000). END
The following example is correct:
FOCEXEC=DRILLDOWN(COUNTRY=&COUNTRY.QUOTEDSTRING OTHER=xxx)
The next example is not correct, and the embedded blanks within the &COUNTRY parameter will terminate the drill-down.
FOCEXEC=DRILLDOWN(COUNTRY=&COUNTRY OTHER=xxx)
For more information, see Creating a Standard Quote-Delimited String.
When you select or manually code the No Selection option within a multi-select list, the parameter value sent to the WebFOCUS Server is _FOC_NULL, by default. Internal processing is then performed by the WebFOCUS Server Describe layer to search the procedure and selectively remove WebFOCUS phrases (such as BY and WHERE) or expressions that contain _FOC_NULL. The procedure is then passed to the core WebFOCUS engine to run the request.
The following is a WHERE example for selecting or manually coding the No Selection option that generates the _FOC_NULL value for dynamic multi-select lists:
WHERE CATEGORY EQ &CATEGORY.(OR(FIND CATEGORY IN MOVIES)).CATEGORY. AND DIRECTOR EQ &DIRECTOR.(OR(FIND DIRECTOR IN MOVIES)).DIRECTOR.;
If No Selection is returned for CATEGORY, the test for DIRECTOR will still be processed.
The following is a WHERE example for selecting or manually coding the No Selection option that generates the _FOC_NULL value for a static multi-select list and a dynamic multi-select list:
WHERE COPIES EQ &COPIES.(<No Selection,_FOC_NULL>,<1,1>,<2,2>,<3,3>).COPIES. AND DIRECTOR EQ &DIRECTOR.(OR(FIND DIRECTOR IN MOVIES)).DIRECTOR.;
Each list must be coded completely on a single line in the procedure.
When coding a HEADING, FOOTING, SUBHEAD, or SUBFOOT, you should have a minimum of one line that does not contain a parameter that could be assigned the value of _FOC_NULL.
When you select or manually code the No Selection option within a multi-select list, the parameter value that may be sent to the WebFOCUS Server is FOC_NONE. Internal processing is then performed by the WebFOCUS Server Describe layer to search the procedure and remove all non-Dialogue Manager lines (do not begin with a dash ‘-’) that contain FOC_NONE. The procedure is then passed to the core WebFOCUS engine to run the request.
The following are WHERE examples for selecting or manually coding the No Selection option that generates the FOC_NONE value:
WHERE CATEGORY EQ &CATEGORY.(OR(FIND CATEGORY IN MOVIES)).CATEGORY.;
WHERE COPIES EQ &COPIES.(<No Selection,FOC_NONE>,<1,1>,<2,2>,<3,3>). COPIES.;
The following are FOC_NONE coding considerations:
When you run a request with a static multi-select list, the Amper Autoprompt facility dynamically adds the Select All option to the list of values that, when selected, assigns all the values in the static multi-select list to the parameter. When the Select All and individual values are selected, the Select All value is ignored.
When Select All is selected, the parameter is assigned the value FOC_ALL. Internal processing is then done by the WebFOCUS Client Amper Autoprompt Facility to assign the parameter the select list values separated by the qualifier (AND or OR) specified in the WHERE statement that references the parameter.
The following example shows a WHERE statement using OR qualifier with static multi-select list for parameter &RATING. The parameter &RATING is referenced in the WHERE statement and in the HEADING. The HEADING shows how the parameter value is set to all values in the multi-select list separated by the OR qualifier.
TABLE FILE MOVIES HEADING " Ratings selected: " " &RATING " PRINT 'MOVIES.MOVINFO.TITLE' 'MOVIES.MOVINFO.COPIES' BY 'MOVIES.MOVINFO.RATING' BY 'MOVIES.MOVINFO.CATEGORY' HEADING "" FOOTING ""
WHERE MOVIES.MOVINFO.RATING EQ &RATING.(OR(<General Audience,G>,
<Not Rated,NR>,<Parental Guidance,PG>,<PG Over 13,PG13>,
<R Over 18,R>)).Rating.;
ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * UNITS=IN, SQUEEZE=ON, ORIENTATION=PORTRAIT, $ TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ TYPE=TITLE, STYLE=BOLD, $ TYPE=HEADING, SIZE=12, STYLE=BOLD, $ ENDSTYLE END
The following image shows the Amper Autoprompt form and report when Select All is selected.
The WebFOCUS Client assigns &RATING the list of values by creating and adding the following syntax to the request sent to the reporting server:
-SET &RATING='''G'' OR ''NR'' OR ''PG'' OR ''PG13'' OR ''R''';
How to: |
In a static list of fields, you specify the field names and display values in the select list for the display or sort command.
cmd &var.(<dsply1[,val1>],<dsply2[,val2>],...<dsplyN[,valN>]).[desc.]
where:
Is the command to which the list of fields will apply. Valid values are PRINT, COUNT, SUM, WRITE, ADD, BY, and ACROSS.
Is the variable, including the ampersand (&), for which you are supplying a list of field values.
Are the entries that display on the launch page. Selecting an entry automatically selects the corresponding field.
Are the field names passed to the reporting server. They can be qualified field names and can be omitted if the display value is identical to the field name.
Is an optional description of the variable.
Note: The entire command, up to and including the description, if there is one, must appear on one line of the report request.
The following request against the GGSALES data source enables the user to select one of the following from each list when running the procedure:
Note: For information about the No Selection option, see Internal Processing of FOC_NONE.
TABLE FILE GGSALES HEADING "Sales Report Summary for: " "Fields: &SumFlds" "Sort: &SortBy" "Across: &Acrs" " " SUM &SumFlds.(<Sales,DOLLARS>,<Budget,BUDDOLLARS>,<Units,UNITS>).Sum. BY &SortBy.(<Category,GGSALES.SALES01.CATEGORY>,<PRODUCT>).By. ACROSS &Acrs.(<Area,REGION>,<State,ST>,<None,FOC_NONE>).Across. WHERE REGION NE 'West' ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, FONT=ARIAL,SIZE=10,SQUEEZE=ON,$ TYPE=HEADING, FONT=ARIAL, STYLE=BOLD, JUSTIFY=LEFT,$ TYPE=HEADING, LINE=1, FONT=ARIAL, STYLE=BOLD, JUSTIFY=LEFT,$ TYPE=TITLE, BACKCOLOR=BLACK, COLOR=WHITE,$ TYPE=ACROSSTITLE, BACKCOLOR=LIGHT BLUE, COLOR=BLUE,$ TYPE=ACROSSVALUE, BACKCOLOR=LIGHT GRAY, COLOR=GREEN,$ END
Running the request opens the following launch page on which the selection for the REGION sort field displays as Area, the selection for the DOLLARS field displays as Sales, the selection for the CATEGORY sort field and the BUDDOLLARS and UNITS fields display in mixed-case, and the display value for PRODUCT is the same as the sort field name. Only one selection is allowed from each list.
Selecting Sales, Category, and None produces the following report:
cmd &var.(cmd(<dsply1[,val1>],<dsply2[,val2>],...<dsplyN[,srtN>])).[desc.]
where:
Is the command to which the list of fields will apply. Valid values are BY and ACROSS. Adding the command around the select list creates a multi-select list.
Is the variable, including the ampersand (&), for which you are supplying a list of field values.
Are the entries that display on the launch page. Selecting an entry automatically selects the corresponding sort field.
Are the field names passed to the reporting server. They can be qualified field names and can be omitted if the display value is identical to the field name.
Is an optional description of the variable.
Note: The entire command, up to and including the description, if there is one, must appear on one line of the report request.
cmd &var.(AND(<dsply1[,val1>],<dsply2[,val2>],...<dsplyN[,srtN>])).[desc.]
where:
Is the command to which the list of fields will apply. Valid values are PRINT, COUNT, SUM, WRITE, and ADD.
Is the variable, including the ampersand (&), for which you are supplying a list of field values.
Is the connector that creates a multi-select list.
Are the entries that display on the launch page. Selecting an entry automatically selects the corresponding sort field.
Are the field names passed to the reporting server. They can be qualified field names and can be omitted if the display value is identical to the field name.
Is an optional description of the variable.
Note: The entire command, up to and including the description, if there is one, must appear on one line of the report request.
The following request against the GGSALES data source enables the user to select one or more of the following when running the procedure:
TABLE FILE GGSALES HEADING "Sales Report Summary for: " "Fields: &SumFlds" "Sort: &SortBy" "Across: &Acrs" " " SUM &SumFlds.(AND(<Sales,DOLLARS>,<Budget,BUDDOLLARS>,<Units,UNITS>)).Sum. BY &SortBy.(BY(<Category,GGSALES.SALES01.CATEGORY>,<PRODUCT>)).By. ACROSS &Acrs.(ACROSS(<Area,REGION>,<State,ST>,<None,FOC_NONE>)).Across. WHERE REGION NE 'West' ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, FONT=ARIAL,SIZE=10,SQUEEZE=ON,$ TYPE=HEADING, FONT=ARIAL, STYLE=BOLD, JUSTIFY=CENTER,$ TYPE=HEADING, LINE=1, FONT=ARIAL, STYLE=BOLD, JUSTIFY=CENTER,$ TYPE=TITLE, BACKCOLOR=BLACK, COLOR=WHITE,$ TYPE=ACROSSTITLE, BACKCOLOR=LIGHT BLUE, COLOR=BLUE,$ TYPE=ACROSSVALUE, BACKCOLOR=LIGHT GRAY, COLOR = GREEN,$ END
Running the request opens the following launch page on which the selection for the REGION sort field displays as Area, the selection for the DOLLARS field displays as Sales, the selection for the CATEGORY sort field and the BUDDOLLARS and UNITS fields display in mixed-case, and the display value for PRODUCT is the same as the sort field name:
Selecting Sales, Units, Category, and Area produces the following report:
How to:
Reference: |
In a dynamic list of fields, you use the FIND command in the select list to retrieve field names and display values from a FOCUS data source.
The following examples create three data sources to be used in the examples that create dynamic field lists:
The following procedure creates the FOCUS data source named GGDETFLD:
APP HOLD IBISAMP DEFINE FILE SYSCOLUM FLDDESC/A20=IF NAME EQ 'DOLLARS' THEN 'Dollars' ELSE IF NAME EQ 'BUDDOLLARS' THEN 'Budget' ELSE IF NAME EQ 'UNITS' THEN 'Units' ELSE 'N/A'; END TABLE FILE SYSCOLUM PRINT FLDDESC BY NAME WHERE TBNAME EQ 'GGSALES' WHERE NAME EQ 'DOLLARS' OR 'BUDDOLLARS' OR 'UNITS' ON TABLE HOLD AS GGDETFLD FORMAT FOCUS END
The following procedure creates the FOCUS data source named GGBYFLD:
APP HOLD IBISAMP DEFINE FILE SYSCOLUM FLDDESC/A20=IF NAME EQ 'CATEGORY' THEN 'Category' ELSE IF NAME EQ 'PRODUCT' THEN 'Product' ELSE 'N/A'; END TABLE FILE SYSCOLUM PRINT FLDDESC BY NAME WHERE TBNAME EQ 'GGSALES' WHERE NAME EQ 'CATEGORY' OR 'PRODUCT' ON TABLE HOLD AS GGBYFLD FORMAT FOCUS END
The following procedure creates the FOCUS data source named GGACRFLD:
APP HOLD IBISAMP DEFINE FILE SYSCOLUM FLDDESC/A20=IF NAME EQ 'REGION' THEN 'Region' ELSE IF NAME EQ 'ST' THEN 'State' ELSE 'N/A'; END TABLE FILE SYSCOLUM PRINT FLDDESC BY NAME WHERE TBNAME EQ 'GGSALES' WHERE NAME EQ 'REGION' OR 'ST' ON TABLE HOLD AS GGACRFLD FORMAT FOCUS END
cmd &var.(FIND return_fieldname [,display_fieldname] IN datasource).[description.]
where:
Is the command to which the list of fields will apply. Valid values are PRINT, COUNT, SUM, WRITE, ADD, BY, and ACROSS.
Is the variable, including the ampersand (&), for which you are supplying a list of field values.
Is the name of the field containing the possible variable values that are returned to the FOCEXEC.
Is the name of the field containing the possible variable values that are displayed in the auto-prompt form.
Note: Both return_fieldname and display_fieldname can be a DEFINE field in a Master File, but not a DEFINE field in a procedure.
Is the data source that contains the fields specified in return_fieldname and display_fieldname. If the fields reside in a cross-reference file of a data source used in a join, use the data source name that contains the fields.
Note: For dynamic lists, the WebFOCUS Client constructs the request to obtain the values using the specified data source. All environmental commands, such as SET commands, needed to obtain the values from the specified data source must be issued in the WebFOCUS Server profile, user profile, or WebFOCUS Client profile.
Is an optional description of the variable.
The following request against the GGSALES data source creates three single-select dynamic lists by retrieving field names from the FOCUS data sources GGDETFLD, GGBYFLD, and GGACRFLD:
TABLE FILE GGSALES HEADING "Sales Report Summary for: " "Fields: &SumFlds" "Sort: &SortBy" "Across: &Acrs" " " SUM &SumFlds.(FIND NAME, FLDDESC IN GGDETFLD).Sum Fields. BY &SortBy.(FIND NAME, FLDDESC IN GGBYFLD).By. ACROSS &Acrs.(FIND NAME, FLDDESC IN GGACRFLD).Across. WHERE REGION NE 'West' ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, FONT=ARIAL,SIZE=10,SQUEEZE=ON,$ TYPE=HEADING, FONT=ARIAL, STYLE=BOLD, JUSTIFY=CENTER,$ TYPE=HEADING, LINE=1, FONT=ARIAL, STYLE=BOLD, JUSTIFY=CENTER,$ TYPE=TITLE, BACKCOLOR=BLACK, COLOR=WHITE,$ TYPE=ACROSSTITLE, BACKCOLOR=LIGHT BLUE, COLOR=BLUE,$ TYPE=ACROSSVALUE, BACKCOLOR=LIGHT GRAY, COLOR = GREEN,$ END
Running the request opens the following launch page with single-select lists for the SUM, BY, and ACROSS commands:
Selecting Dollars on the Sum Fields drop-down list, Category on the By drop-down list, and Region on the Across drop-down list produces the following report:
cmd &var.(cmd(FIND return_fieldname [,display_fieldname] IN datasource)).[description.]
where:
Is the command to which the list of fields will apply. Valid values are BY and ACROSS. Adding the command around the select list creates a multi-select list of values.
Is the variable, including the ampersand (&), for which you are supplying a list of field values.
Is the name of the field containing the possible variable values that are returned to the FOCEXEC.
Is the name of the field containing the possible variable values that are displayed in the auto-prompt form.
Note: Both return_fieldname and display_fieldname can be a DEFINE field in a Master File, but not a DEFINE field in a procedure.
Is the data source that contains the fields specified in return_fieldname and display_fieldname. If the fields reside in a cross-reference file of a data source used in a join, use the data source name that contains the fields.
Note: For dynamic lists, the WebFOCUS Client constructs the request to obtain the values using the specified data source. All environmental commands, such as SET commands, needed to obtain the values from the specified data source must be issued in the WebFOCUS Server profile, user profile, or WebFOCUS Client profile.
Is an optional description of the variable.
cmd &var.(AND(FIND return_fieldname [,display_fieldname] IN datasource)).[description.]
where:
Is the command to which the list of fields will apply. Valid values are PRINT, COUNT, SUM, WRITE, and ADD.
Is the variable, including the ampersand (&), for which you are supplying a list of field values.
Is the connector that creates a multi-select list.
Is the name of the field containing the possible variable values that are returned to the FOCEXEC.
Is the name of the field containing the possible variable values that are displayed in the auto-prompt form.
Note: Both return_fieldname and display_fieldname can be a DEFINE field in a Master File, but not a DEFINE field in a procedure.
Is the data source that contains the fields specified in return_fieldname and display_fieldname. If the fields reside in a cross-reference file of a data source used in a join, use the data source name that contains the fields.
Note: For dynamic lists, the WebFOCUS Client constructs the request to obtain the values using the specified data source. All environmental commands, such as SET commands, needed to obtain the values from the specified data source must be issued in the WebFOCUS Server profile, user profile, or WebFOCUS Client profile.
Is an optional description of the variable.
The following request against the GGSALES data source creates three multi-select dynamic lists by retrieving field names from the FOCUS data sources GGDETFLD, GGBYFLD, and GGACRFLD:
TABLE FILE GGSALES HEADING "Sales Report Summary for: " "Fields: &SumFlds" "Sort: &SortBy" "Across: &Acrs" " " SUM &SumFlds.(AND(FIND NAME, FLDDESC IN GGDETFLD)).Sum Fields. BY &SortBy.(BY(FIND NAME, FLDDESC IN GGBYFLD)).By. ACROSS &Acrs.(ACROSS(FIND NAME, FLDDESC IN GGACRFLD)).Across. WHERE REGION NE 'West' ON TABLE SET PAGE NOPAGE ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, FONT=ARIAL,SIZE=10,SQUEEZE=ON,$ TYPE=HEADING, FONT=ARIAL, STYLE=BOLD, JUSTIFY=CENTER,$ TYPE=HEADING, LINE=1, FONT=ARIAL, STYLE=BOLD, JUSTIFY=CENTER,$ TYPE=TITLE, BACKCOLOR=BLACK, COLOR=WHITE,$ TYPE=ACROSSTITLE, BACKCOLOR=LIGHT BLUE, COLOR=BLUE,$ TYPE=ACROSSVALUE, BACKCOLOR=LIGHT GRAY, COLOR = GREEN,$ END
Running the request opens the following launch page with multi-select lists for the SUM, BY, and ACROSS commands. Note that No Selection is automatically added to each list:
Selecting Dollars, Units, Category, and Region produces the following report:
You can customize the look and feel of the amper auto-prompting facility by editing the launch page template file you are using. All of the available launch page templates are located in the ibi\WebFOCUS77\ibi_html\javaassist\ibi\html\describe directory. The default template is autoprompt_top.css.
If you want to customize the banner, create an image, save it in the describe directory, and change the background-image property, which is shown in bold type in the following Cascading Style Sheet (CSS) code:
#idBannerDiv {
height:41px;
background-image:url(style/logo_banner_TOP.gif);
background-position:top left;
background-repeat:no-repeat;
margin:0px;
margin-top:0px;
cursor:pointer; }
The option to select different launch page templates can be set in the WebFOCUS Administration Console using the Parameter Prompting selection under Client Settings, where you can set the IBIF_describe_xsl value to one of the launch page templates.
You can also enter the name of the desired launch page template in a FOCEXEC using the following code:
<describe_xsl>template</describe_xsl>
where:
Is set to one of the following launch page template values:
You can specify amper auto-prompting settings directly in a URL to run a report. The WebFOCUS Client configuration settings that you can specify for parameter prompting are as follows:
The possible values for both of these settings are:
When a request is sent to the WebFOCUS Client to run a report, the WebFOCUS Client adds the following parameter to the request sent to the WebFOCUS Reporting Server:
WFDESCRIBE=value
where:
Communicates to the WebFOCUS Reporting Server the required level of parameter prompting evaluation.
Is the value of the WebFOCUS Client configuration parameter prompting setting, which can be specified in the URL sent to the WebFOCUS Client to run the report request using the IBIF_wfdescribe setting. The IBIF_wfdescribe setting is used on the URL for both self-service and Managed Reporting requests.
You can use the WebFOCUS Client variable IBIC_server to specify the server node for the report. For more information about IBIC_server, see the WebFOCUS Security and Administration manual.
The following is an example of a URL used to run a WebFOCUS Reporting Server procedure named movies on the Reporting Server node EDASERVE with IBIF_wfdescribe set to XMLRUN:
http://hostname[:port]/ibi_apps/WFServlet?IBIF_ex=movies &IBIC_server=EDASERVE&IBIF_wfdescribe=XMLRUN
Note: Changes to the parameter prompting configuration setting should be evaluated in a development or test environment, and the evaluation should include running existing reports and applications.
For more information about IBIF_wfdescribe, see the Changing WebFOCUS Client Settings in the WebFOCUS Administration Console topic in the WebFOCUS Client Core Processing Details chapter of the WebFOCUS Security and Administration manual.
For more information about IBIMR_prompting, see Changing Managed Reporting Settings, in the Managed Reporting Settings in the WebFOCUS Administration Console topic within the Managed Reporting Processing Details chapter of the WebFOCUS Security and Administration manual.
WebFOCUS |