Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 2 The Report Generator : Tasks to Generate a Report

Tasks to Generate a Report
Tasks for Generating a Report
Required Tasks
The following table presents the tasks required to generate a report. The number of tasks involved varies if your report is based on more than one data table. Except for Task C, the procedure is the same for single or multiple data tables.1
 
Task A Identify the source data tables
Purpose of this Task
This task indicates which data tables you require for your report. You can access the Select Source Tabless screen by selecting its option on the main Report Generator screen.
Select Tables Screen

 
Report: MAN_DEP_SAL REPORT GENERATOR
Select Source Table(s)
+----------------------------------------------------------------------------+
| Table Parm Name Parm Value |
| ---------------- ---------------- ---------------------------------------- |
| EMPLOYEE REGION 'midwest_genrpt' |
| DEPARTMENT CITY 'bayville' |
| MANAGER |
| |
| |
| |
| |
| |
+----------------------------------------------------------------------------+
Tables with UNIT: DOCEXMPL and NAME like: *EMPLO*
_ $@EMPLOYEE _ $@EMPLOYEES _ $EMPLOYEE_EXPENS _ @EMPLOYEES
_ @EMPLOYEES_CLC _ EMPLOYEE_CLC _ EMPLOYEE_EXPENSE _ EMPLOYEES
_ EMPLOYEES_CLC _ EMPLOYEES_SUB
PFKEYS: 1=HELP 3=RETURN 12=END 23=EXCLUDE TBL
Select table from list or enter table name directly

 
How to Enter Values
Enter values directly in the top portion of the screen or select them from the scrollable display in the bottom portion of the screen.
Displaying Tables for Selection
When the Select Source Tables screen first appears, it contains a scrollable listing of tables based upon your default UNIT. You can modify this listing to display a subset of these tables or a different set of tables. Use the following as a guide to help you find the tables you are looking for:
The approximate names of the tables that you require
NAME like field.
type in a partial name along with the asterisk (*), or
use question mark (?) wildcard characters.
Both the UNIT and approximate name
Tables with UNIT field and NAME like field
Type in the values as described above.
Selecting the Tables
Type an alphanumeric character in the line command field of each table that you want to select. Use the sequential order 0-9, A-Z. The tables are then listed in the Table field based on this order.
Removing a Table
To remove a table name from the list, position your cursor on the table name and press PF23. If you remove a table, all references to that table in the rest of the report are also deleted.
Guidelines for Entering Table Information
Follow these guidelines when entering the table information:
One or more table names can be entered into a Table field. Enter each table name on its own row in the Table field.
If you are using multiple tables, enter the table names so that you can use the data from the multiple tables (relating data). Refer to Task C, Relate the data of two or more tables for more information about relating tables.
If a table is parameterized, you can also enter the parameter name and value (thus bypassing the Specify Parameters screen). Refer to Task B, Specify parameter values for more information.
The PRM table must be included before the source parameterized table in the list of tables in the Select Tables screen. If the PRM table does not exist, contact your TIBCO Object Service Broker administrator.
Task B Specify parameter values
Purpose of this Task
This task is used to indicate (to the report formatter) which instance of a parameterized table to use in the report.
Where Parameter Values Can be Specified
Parameter values are required only for parameterized tables. There are three different places to specify the parameter values required for parameterized tables. Depending on your requirements, you can use the:
Choosing Where to Specify the Values
Use the following table to determine which screen you should use to specify parameter values:
Type the value in the Parm Value field, next to the appropriate parameter name. Refer to Task A, Identify the source data tables for an illustration of this screen.
Do not know the parameter value and you are not going to relate parameter values to field values
Specify Parameters.
Type the value in the Parm Value field, next to the appropriate parameter name and select the value from the displayed list. Refer to Guidelines for Specifying Parameter Values for more information.
Are going to relate parameter values to field values
Guidelines for Specifying Parameter Values
When specifying parameter values, note the following:
A PRM table for the parameterized table is required to select parameter values. If the PRM table does not exist and you require one, contact your TIBCO Object Service Broker administrator.
A PRM table is not required if you are entering the parameter values directly into the Select Tables screen or Relate Tables screen.
A default value of null ('') appears in the Parm Value field of the Select Tables screen if a table has a location parameter and a value is not assigned to it.
See Also
TIBCO Object Service Broker Managing Data for more information on location parameters.
Using the Specify Parameters Screen
When the Specify Parameters screen first appears, it contains a scrollable listing of parameter values for the first parameter name listed on the Select Tables screen. The following table describes how to display additional parameter values:
Position your cursor on the parameter name and press Enter.
Specify Parameter Values Screen

 
Report: MAN_DEP_SAL REPORT GENERATOR PF4=NEXT
Specify Table Parameter Values
+----------------------------------------------------------------------------+
| Table Parm Name Parm Value |
| ---------------- ---------------- ---------------------------------------- |
| EMPLOYEE REGION ‘midwest_genrpt’ |
| DEPARTMENT CITY ‘bayville’ |
| MANAGER |
| |
| |
| |
| |
| |
+----------------------------------------------------------------------------+
Existing value(s) for Parm REGION of Table EMPLOYEE
_ ABC00 _ C500A _ DOC30 _ EDUC
_ JJJ40 _ MIDWEST _ MIDWEST_GENRPT _ MAMBO
_ REGION _ USR30 _ ZIP60 _ ZZ00A
PFKEYS: 1=HELP 3=RETURN 12=END
Select parameter value from list or enter value(s) directly

 
Selecting Parameter Values
To select a parameter value, type an alphanumeric character in the line command field of the required value.
Task C Relate the data of two or more tables
Purpose of this Task
Complete this task if you are using data from more than one table. You must draw a link between the tables by associating individual elements from the tables to one another. You use the Relate Source Tables screen to associate the data.
Relate Source Tables Screen

 
Report: MAN_DEP_SAL REPORT GENERATOR PF4=NEXT
Relate Source Tables
+----------------------------------------------------------------------------+
|RELATE: Table Parm/Field TO: Table Field |
| ---------------- ---------------- ---------------- ---------------- |
| DEPARTMENT DEPTNO EMPLOYEE DEPTNO |
| DEPARTMENT EMPLOYEE |
| MANAGER MANAGER_NUM EMPLOYEE MGR# |
| MANAGER |
| |
| |
+----------------------------------------------------------------------------+
RELATE: Parm/Field of DEPARTMENT TO: Field of EMPLOYEE
_ CITY _ DEPTNO _ EMPNO _ LNAME
_ DEPTNAME _ POSITION _ MGR#
_ DEPTNO _ SALARY
_ HIREDATE _ ADDRESS
_ CITY _ STATE_PROV
_ ZP_CODE _ BIRTHDATE
_ SECURITY _ ACCESS_TYPE
PFKEYS: 1=HELP 3=RETURN 12=END
Select from list or press <Enter> for next selection

 
Entering and Displaying Parameter and Field Values
Enter the values directly into the appropriate fields or select them from the scrollable display in the bottom portion of the screen.
When the Relate Tables screen first appears, the bottom portion of the screen contains two columns listing the fields or parameters of the first two tables selected in the Select Tables screen. The columns contain the following information:
Displaying Additional Table and Field Values
The following table describes how to display additional table and field values:
Sequential listing of additional tables.
Selecting the Values to Relate
Type a pair of identical alphanumeric characters in the line command fields of the fields or parameters you want to relate and press Enter. For example, to relate the DEPTNO field of the EMPLOYEE table to the DEPTNO field of the DEPARTMENT table, type the number 1 next to DEPTNO of both tables. Repeat this operation until all required links are made.
Guidelines for Relating Values
When relating values, note the following guidelines:
The PRM table must be included before the source parameterized table in the list of tables in the Select Tables screen. If the PRM table does not exist, contact your TIBCO Object Service Broker administrator.
Assignments to parameter values in the Specify Parameters screen are overridden if the parameter is associated with a field of another table.
Task D Specify selection criteria
Purpose of this Task
This optional task is used to specify the selection of data when you want to report on a specific range of data. Use the Specify Selection Criteria screen to specify the selection of data.
Specify Selection Criteria Screen

 
Report: MAN_DEP_SAL REPORT GENERATOR PF4=NEXT
Specify Selection Criteria
+----------------------------------------------------------------------------+
| Selection Criteria |
| -------------------------------------------------------------- |
| MGR# = 80002 OR MGR# =79912 |
| |
| |
| |
+----------------------------------------------------------------------------+
Fields of EMPLOYEE
_ EMPNO _ LNAME _ POSITION _ MGR#
_ DEPTNO _ SALARY _ HIREDATE _ ADDRESS
_ CITY _ STATE_PROV _ ZP_CODE _ BIRTHDATE
Relational Operator
_ = _ < _ > _ <= _ >= _ ¬= _ LIKE
Value / Expression
Logical Operator
_ AND _ OR
PFKEYS: 1=HELP 3=RETURN 12=END
Select from lists or enter selection string directly

 
Entering and Displaying Field Values
You can enter values directly into the appropriate screen or select them from the display in the bottom portion of the screen.
When the Selection Criteria screen first appears, it contains a list of the fields of the first table entered in the Table field of the Select Tables screen. Press Enter to display the rest of the tables in sequence.
Selecting Field Values
Complete the following tasks to define selection criteria:
1.
2.
3.
4.
Guidelines for Specifying Selection Criteria
When specifying selection criteria, note the following:
Recall previous selections by pressing PF9. This re-enters your selection values in the line command fields of the previously selected fields.
Examples of Selection
The following illustrates two types of data selection: Numeric Field Value and Character Data Selection.
Numeric Field Value Selection
The following example shows how to select data that is specific only to the manager number 79912 or the manager number 80002:
MGR#=79912 OR MGR#=80002
Character Data Selection
The following example shows how to select data that is specific to the departments managed by JOHN DUBINSKY:
MANAGER_NAME=’JOHN DUBINSKY’
Task E Specify print and control fields
Purpose of this Task
This task controls output by indicating:
Specify Print/Control Fields Screen

 
Report: MAN_DEP_SAL REPORT GENERATOR PF4=NEXT
Specify Print/Control Fields
+----------------------------------------------------------------------------+
| SUMMARY only: N |
| PRINT: ---------------- ---------------- ---------------- |
| LNAME POSITION SALARY |
| |
| |
| |
| SORT by: ---------------- A/D ---------------- A/D ---------------- A/D |
| MANAGER_NAME A DEPTNAME A POSITION A |
| |
| BREAK by: ---------------- ---------------- ---------------- |
| MANAGER_NAME DEPTNAME |
| |
| ACROSS by: ---------------- ---------------- ---------------- |
| |
+----------------------------------------------------------------------------+
Fields of EMPLOYEE
_ EMPNO _ LNAME _ POSITION _ MGR#
_ DEPTNO _ SALARY _ HIREDATE _ ADDRESS
_ CITY _ STATE_PROV _ ZP_CODE _ BIRTHDATE
PFKEYS: 1=HELP 3=RETURN 12=END
Select field & put cursor on Print/Sort/Break/Across section

 
Types of Print Fields
The output is based on the fields you select to populate the following field types:
To display a summary of the data (if the report is defined as a summary or across report).

1
These field types are required for a summary or across report only. For more information on summary reports, refer to Chapter 5, Creating Across Reports.

Entering and Selecting Field Values
To enter field values, do one of the following:
Each section of this screen is used to identify a type of field.
When the Print/Control Fields screen first appears, it contains a listing of the fields of the first table entered in the Table field of the Select Tables screen. Press Enter to display the fields in the rest of the tables in sequence.
Selecting Fields
To select fields, perform the following tasks:
1.
Use the sequential order 0-9, A-Z.
2.
3.
Creating a Summary Report
To create a report that summarizes data, type Y in the SUMMARY only field. For more information on summary reports, refer to Chapter 5, Creating Across Reports.
Guidelines for Indicating Print Controls
Use the following guidelines when indicating the print controls:
Across-by fields cannot be sort-by fields.
Recall previous selections by pressing PF9. This re-enters your selection values in the line command fields of the previously selected fields.
Task F Add break functions to the report
Purpose of this Task
Using this task you can perform mathematical computations within your report either at break time or within a summary report (using the functions supplied by the Report Generator). Use the Select Report Functions screen to identify the mathematical functions that you want to use.
Select Report Functions Screen

 
Report: MAN_DEP_SAL REPORT GENERATOR PF4=NEXT
SALARY 1 TOT Select Report Functions
+----------------------------------------------------------------------------+
| BREAK by: MANAGER_NAME |
| --- ---------------- --- ---------------- --- ---------------- |
| TOT SALARY |
| |
| BREAK by: DEPTNAME |
| --- ---------------- --- ---------------- --- ---------------- |
| |
| |
| FINAL BREAK: |
| --- ---------------- --- ---------------- --- ---------------- |
| TOT SALARY |
| |
+----------------------------------------------------------------------------+
Functions List of Print Fields
_ AVG (AVERAGE) _ LNAME _ POSITION _ SALARY
_ CNT (COUNT)
_ MAX (MAX)
_ MIN (MIN)
_ TOT (TOTAL)
PFKEYS: 1=HELP 3=RETURN 12=END
Select function & field then put cursor on appropriate section

 
Available Function Types
You can apply the following functions to the print fields:
Provided Values
The following values are provided by default:
Up to three break-by fields appear at a time in each break-by section. To view additional fields press Enter.
Each selected function is associated with a print field within a break. The values are printed at the end of the break. A function associated with a print field in the final break prints a grand total for that field at the end of the report.
Entering and Selecting Field Values
To enter field values, perform one of the following:
When the Report Functions screen first appears, it contains a list of the fields of the first table entered in the Table field of the Select Tables screen. Press Enter to display the fields in the rest of the tables in sequence.
Selecting Fields
To select fields, perform the following tasks:
1.
Use the sequential order 0-9, A-Z.
2.
3.
Task G Finalize the appearance of the report
Purpose of this Task
This task is used to:
How to Enter Values
Enter values directly into the individual sections of the Customize/Execute Report screen.
Customize/Execute Report Screen

 
Report: MAN_DEP_SAL REPORT GENERATOR
Customize/Execute Report
+----------------------------------------------------------------------------+
| Line# Report title(s) |
| ----- ------------------------------------------------------------------- |
| 1 $PRINTDATE $RPTTIME Report: |
| 1 $THE_REPORT_NAME Page $PAGE |
| 2 |
| Fcn Field Label Display Mask |
| COMMA N MONEY N D/C _ |
| --- ---------------- --------------------------- ------------------------- |
| LNAME ’Last Name’ |
| POSITION ’Position’ |
| SALARY ’Salary’ |
| MANAGER_NAME ’Manager’ |
+----------------------------------------------------------------------------+
| Report name: MAN_DEP_SAL |
| Destination: Screen: N Printer: N DDname/Variable: |
| File: |
| Save report and send to dest.: N with record Limit: |
| Save report: N Save rule: N by name: in library: USR40 |
+----------------------------------------------------------------------------+
PFKEYS: 1=HELP 3=RETURN 12=END
Specify a medium and select an action to produce report

 
Making Final Changes to the Appearance
You can make changes to the appearance of your report before it is executed. Use the numbered lines in the Line# field to customize the title of your report. You can use up to 132 spaces across two lines numbered the same for each title line of your report. You can add up to two complete lines of text.
Report Functions
The following report functions are provided in the first title line. These can be moved or deleted as required:
Use the Label field to customize the field titles that appear for your print fields and break/summary functions. The new text must be within single quotes, for example, ‘Department’.
Adding Display Masks
You can use the Display Mask field to define the display format for numeric and date fields. An example of a display mask is a dollar sign ($) proceeding and a comma (,) separating numbers. You can also add a debit and credit mask, to be used in conjunction with the other masks.
To add a display mask, type in valid display mask values in the Display Mask field on the appropriate line for the field. For valid display mask values, refer to TIBCO Object Service Broker Defining Screens and Menus and the $PIC tool in TIBCO Object Service Broker Shareable Tools. Use the following fields to change or add display masks to your numeric fields.
COMMA field.
The default monetary symbol for your session and commas as numeric delimiters
MONEY field.
D/C field and
COMMA field, or
MONEY field.
Prompting for a Representational Example
Optionally, you can prompt for a representational example:
1.
If COMMA or MONEY is Y, you can specify D (for debit) or C (for credit) in the D/C field.
2.
3.
A representational example of the mask appears in the Display Mask field.
4.
Renaming the Report
To rename the report, change the name of the report to a valid TIBCO Object Service Broker name in the Report field. When you save the report it is saved under this new name.
Task H Execute the report
Purpose of this Task
This task is used to save and execute the report and the rule.
Customize/Execute Report Screen Functionality
The following table lists the functions you can perform using the Customize/Execute Report screen:
Limit the number of occurrences to be printed on the report
The number of occurrences
The name of a file 1 or data set 2
File field.
The name to save it under
Save Rule field by name field 3.

1
Enter only the filename. The path is predetermined.

2
Enter the fully qualified name of a pre-allocated data set with a minimum record length of 132. If the data set is partitioned, enter the member name in parentheses.

3
The rule is saved in the library listed in the ‘in library’ field.

Viewing the Report
When you type Y in the and send it to Screen field and press Enter, the report appears on your screen. The following illustrates an example of a displayed report:

 
------------------ O B J E C T S T A R INFORMATION LOG ------------------
COMMAND ===> SCROLL ===> P
04/MAR/2000 Report:MAN_DEP_SAL Page 1
Manager:JOHN DUBINSKY
Department:EDUCATION
Name Position Salary
---------------------- --------------- -------------
STEVENSON EDUCATOR $700.00
DHILLON EDUCATOR $685.00
Department:PUBLICATIONS
CROFTON TECH. WRITER $675.00
POIRIER TECH. WRITER $695.00
Subtotal $2,755.00
Manager:SUSAN SIMONS
Department:RESEARCH
HRODEK ANALYST $710.00
CANNON ANALYST $700.00
BOIVIN ANALYST $710.00
KIMURA JR. PROGRAMMER $575.00
WONG SENIOR ANALYST $800.00
SCHULTZ SENIOR ANALYST $820.00
SMITH TESTER $600.00
Subtotal $4,915.00
Total $7,670.00
PFKEYS: 2=NEXT LOG 3=EXIT 5=REPEAT 12=EXIT 13=PRINT

 

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved