In this section: |
The WebFOCUS amper auto-prompting facility now enables you to create a launch page that prompts users to select one or more fields to apply to each display and sort command in a report request. The list controls in the autoprompt form display in the order the amper variables are coded in the procedure (FOCEXEC).
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 the section named Internal Processing of FOC_NONE in the Developing Reporting Applications manual.
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 datasource. All environmental commands, such as SET commands, needed to obtain the values from the specified datasource 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 datasource. All environmental commands, such as SET commands, needed to obtain the values from the specified datasource 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 datasource. All environmental commands, such as SET commands, needed to obtain the values from the specified datasource 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:
WebFOCUS |