The Reports Menu provides easy access to pre-written report programs. It is not a report writer. If you need to create a report without a program refer to the section describing queries and IBM's Query for the iSeries (AS/400) manuals.
Report programs may be designed to execute interactively (on-line), in batch mode, or either. The program may require a parameter list requiring input for execution, or it may run with no parameters.
The report program must be written and compiled into a program object before the Reports Menu can recognize it and select it for use. Reporting programs are listed on the menu. When you select a report, you are prompted for the parameters of the program you want to use. A report program might have no parameters.
You can use a filter with report programs to select appropriate data from the ActionWare database. You can access other files outside the standard ActionWare database, or use the iSeries (AS/400) Open Query File command to select records.
For each report program defined in the ActionWare Reports Menu, the System Administrator can provide a list of acceptable values for any of the required parameters. Definitions are created through the Define Reports Menu option on the Configuration Menu.
Configuring Report Menu
To access the Report Menu Options Maintenance screen, begin at the ActionWare Main menu:
To access the ActionWare Main Menu, from a command entry line:
Type AW4LM |
Press Enter |
To access the the Configuration Menu:
Option 5 Configuration Menu |
Press Enter |
Use this screen to work with the following options.
Option 50 Define Reports Menu |
Press Enter |
This opens the Reports Menu Options Maintenance screen:
Reports Menu Options Maintenance |
||||||
Type option(s),
press Enter |
||||||
Opt |
Menu |
Description |
B/O/E |
No of |
Sec |
Filter |
__ |
01 |
Abbreviated Contact List |
0 |
0 |
0 |
Y |
__ |
02 |
Name and Address Detail |
0 |
0 |
0 |
Y |
__ |
03 |
Full Contact Detail |
0 |
0 |
0 |
Y |
__ |
04 |
Pending Activities by Target Usr |
0 |
1 |
0 |
N |
__ |
05 |
Activity History by Target |
0 |
0 |
0 |
N |
__ |
06 |
Overdue Activities by Target Usr |
0 |
1 |
0 |
N |
__ |
07 |
Campaign/Plan Activity Report |
0 |
0 |
0 |
N |
__ |
08 |
Campaign Status Summary by Step |
0 |
0 |
0 |
N |
__ |
09 |
Run a Query |
0 |
1 |
0 |
N |
__ |
10 |
Run Query PHONE.RSP (Display) |
0 |
0 |
0 |
N |
__ |
11 |
Run Query PHONE.RSP (Print) |
B |
0 |
0 |
N |
__ |
12 |
Run Query PHONE.USR (Display) |
0 |
0 |
0 |
N |
__ |
13 |
Run Query PHONE.USR (Print) |
B |
0 |
0 |
N |
__ |
14 |
Run Query PHONE.HRD (Display) |
0 |
0 |
0 |
N |
F3=exit ..... F6=add new menu number .......... F12=cancel .................... Page Up/Down |
This screen lists all reports that have been created. Initially there are eight standard reports: Abbreviated Contact List, Name and Address Detail, Full Contact Detail, Pending Activities by Target User, Activity History by Target, Overdue Activities by Target User, Campaign/Plan Activity Report, and Campaign Status Summary by Step.
Prompts: |
What happens: |
Opt |
1 character prompt, valid options are: 2=Change, 3=Copy, 4=Delete and 5=Display |
Menu Option |
The report number that appears in the general reports menu |
Description |
The report title that appears in the general reports menu |
B/O/E |
Whether the report is executed in batch. The user will be prompted at time of execution |
No of Parms |
Number of parameters that exist within the report |
Sec Level |
Minimum security level needed to execute the report |
Filter Required |
Whether a filter needs to be activated before the report can be executed |
Creating Reports
To create a new report, begin in the Reports Menu Options Maintenance screen, use F6=add new menu number. This opens the Report Option Parameters Maintenance screen,
Report Option Parameters Maintenance |
Option Number: ____ Description: ________________________________ |
Execution Environment........................................... |
Batch or
On-Line or Either: ...B .(B/O/E)
....... Program
Name..: ___________ |
Parameters Required............................................... |
Total Number Defined: __ (0 - 9)................................................. |
Parameters 1 thru 3 |
Parm......
Prompt Description........................
......Type... Len...
Dec ...Valid Entries |
F3=exit ... F5=refresh .... F8=parms 4-6.... F9=parms 7-9 ....F12=cancel ............ ENTER=edit/save |
There are six fields and parameters that define how the report will execute. If interactive (on-line) execution is specified, the batch job name is not required. Otherwise, all parameters and fields must be completed.
Prompts: |
Values: |
Option |
Number that appears in the General Reports menu |
Description |
Report name that appears in the General Reports menu |
Batch or On-Line |
How the report will be executed |
Program name |
Program name that drives the report. See below for more information on report program characteristics |
Filter required |
Enter Yes or No |
Batch job name |
System name of the report when running in batch |
Sec Level for Access |
Minimum level of security needed to access the report. If a user has a lower security level, the report will not appear in their General Reports menu. Default is 0, which means anyone in the enrolled user list can execute the report. This is relevant only if hierarchical security is activated |
Optional Parameters |
Up to nine parameters can be specified for each report option. Each parameter can be alpha or numeric and up to 30 characters long. Numeric values can have decimal positions. If the report program expects a limited number of acceptable values for a parameter, the values can be defined for the report option using the menu configuration program. User input will be edited against the list. If any value is acceptable, no values should be defined. If one valid value is defined for a parameter, and it is the only parameter required (all operational parameters are fully defined), the user cannot see the parameter input display. The report option is submitted and executed immediately |
Report Program Characteristics
The report program must have the following characteristics:
Data input using a filter.
Entry point parameter list.
These are described in greater detail below.
This information is directed towards a programmer who wants to design reports that run from the user report menu.
Data Input Using Filters
This is optional. If you want to use a filter, two methods are available to access the filtered file. The first employs the standard ActionWare programs EF010 and EF342 to open the filter and then return the key fields required to access the selected records from the ActionWare database one record at a time. The report program uses the key field information to retrieve records, and then use the records to produce the report lines.
The second method uses the first standard ActionWare program (EF010) to build the complete Open Query File command statement for the filter and return it to the report program where it is used to open the query file for direct access by that program. This method requires the report program to use the QCMDEXC program to execute the returned OPNQRYF command, and to perform the necessary file-overrides and file-opens so that correct data retrieval occurs. The parameter lists required to access these two programs are defined in the section Program Parameters.
Entry Point Parameter List
This must conform to the parameters used by the Reports Menu to call the program. The parameter list depends on two factors: whether a standard ActionWare filter will be used by the report program, and what parameters are defined to the Reports Menu configuration program for the report option.
When the Reports Menu prepares the parameter list used to call the report program, the following decision structure is used:
Is an ActionWare filter required for data input to the report?
If the answer is yes, the first two parameters in the list will be the contents of the six indicators 31 - 36 (6 positions, each a 0 or 1, from the main ActionWare program) and the name of the filter (10 alphanumeric positions). Indicator 34 specifies whether the selected filter is already open so that if the report program is executing interactively, the filtered data can be retrieved without re-opening the filter.
If the answer is no, no parameters are included in the parameter list. If no filter is required, then there will be no parameter list for the report program call. If the answer is yes and at least one parameter is defined, the parameter list exists and contains as many parameters as were defined.
Program Parameters
This section provides information for program parameters for Filter Open (EF010) and Filter Record Retrieval (EF342) programs. The following table shows the contents of the program EF010, Build Open Query File Statement and optionally Open the Filter.
Parm |
Description |
Length |
Type |
Returned Values |
1 |
Filter Identity |
10 |
A |
|
2 |
Override D/B statement |
80 |
A |
Ready to execute command |
3 |
Error Message Id |
7 |
A |
EF41502 if Filter Id invalid |
4 |
Filter Description |
32 |
A |
From the filter definition |
5 |
Filter Type |
1 |
A |
D = Dynamic, S = Static |
6 |
File Used |
1 |
A |
1 = CUST |
7 |
Filter Focus |
1 |
A |
1 = Contact, 2 = Activity |
8 |
Key Field |
8 |
A |
1st Key Field |
9 |
Record Count |
9,10 |
N |
Number of records selected |
10 |
Open Query File Statement |
2000 |
A |
Ready to execute command |
Parameter 10 is optional. If the parameter is defined, which means it is included in the parameter list in the calling program, then the filter will not be opened and the complete OPNQRYF statement will be returned in this parameter.
The following table shows the contents of the program EF3423-Return Key Field information for Next Filtered Record
Parm |
Description |
Length |
Type |
Returned Values |
1 |
Contact Primary ID (PID) |
10 |
A |
Key Value |
2 |
Contact Secondary ID (SID) |
10 |
A |
Key Value |
3 |
Activity Primary ID (TRPID |
10 |
A |
Key Value |
4 |
Activity Secondary ID (TRSID) |
10 |
A |
Key Value |
5 |
Activity Date (TRDAT) |
6,0 |
N |
Key Value, format YYMMDD |
6 |
Activity Time (TRTIM) |
4,0 |
N |
Key Value, format HHMM |
7 |
Activity Suffix (TRSUF) |
5.0 |
N |
Key Value |
8 |
Action Requested (C = current, record, B = back one record, F = forward one record) |
1 |
A |
|
9 |
Error Message ID |
7 |
N |
AMS0003 = Start of File |
10 |
Filter Identity (same as passed to EF010, above) |
10 |
A |
|
11 |
Filter Focus (1 = Contact, 2 = Activity, as returned from EF010, above) |
1 |
A |
|
12 |
Control Flag (blank = normal retrieval based on action requested, 0 = start of file, 1 = position to key fields) |
1 |
A |
|
13 |
Sort Key Field 1 |
32 |
A |
|
14 |
Sort Key Field 2 |
32 |
A |
|
15 |
Sort Key Field 3 |
32 |
A |
|
16 |
Sort Key Field 4 |
32 |
A |
|
17 |
Primary ID |
10 |
A |
|
18 |
Secondary ID |
10 |
A |
|
19 |
Activity Date |
4,0 |
N |
|
20 |
Activity Time |
6,0 |
N |
|
21 |
Activity Suffix |
5,0 |
N |
All parameters must be passed, but some parameters may contain null values if record positioning is not required. Parameters 13 through 21 are only applicable if the control flag parameter contains the value '1'.