Generate Report Schema utility

The Generate Report Schema utility generates a Report Definition Language description of your report definition file to a file.

1. Select ReportWriter utilities > Generate report schema.

1. Generating a report schema.

2. In the Generate Report Schema window, enter data in the fields as instructed below.

Report definition file

Enter the name of the report definition file whose schema (Report Definition Language description) you want to generate. This field defaults to the name of the report definition file ReportWriter is currently using.

Output filename

Enter the name of the file into which the report schema should be generated. The default extension is .rdl.

Selection option

Indicate which reports you want to include in the schema:

All = Specify all report definitions or a set of reports using a wildcard character (* or ?).

Single = Specify a particular report.

Report name

If you chose All in the Selection option field, you can enter a partial report name with a wildcard character to specify a set of reports. For example, if you type ORDER*, all report names that start with “ORDER” will be selected. If you type *ORDER*, all report names that contain the character sequence “ORDER” will be selected.

If you chose Single in the Selection option field, enter the name of the report definition you want to select. To select from a list of reports, select Utility functions > List selections.

In the example in figure 1, all reports in RPTDAT:reports.rpt will be generated to reps.ddf.

3. To generate the report schema, exit the window.

If the filename you specified in the Output filename field does not exist, the file is created. If the file already exists, you are prompted

File already exists. Do you want to delete it?

When processing is complete, you are returned to the ReportWriter utilities menu.

;  REPORT DEFINITION LANGUAGE OUTPUT
;                               
;  REPORTS DEFINITION FILE : RPTDAT:reports.rpt
; 
;  CREATION DATE           : 10-NOV-96, 09:40:11
;  REPORTWRITER VERSION    : 6.1
REPORT  "STATISTICS"
 
FILE PLAYERS.PLAYERS  ID 1
FILE DRAFT.DRAFT  ID 2  PARENT 1  RELATION 1
 
TEMPTEXT FLAG TTEXT "*" DESCRIPTION "Cost flag"
 
SUBTOTAL RT_HRUNS TOTALFIELD B_HR BREAKFIELD TEAMNAME TOTALTYPE COMPLETE
    DESCRIPTION "Total Home Runs"
TEMPTEXT HDR_TXT TTEXT "-- Total number of home runs"
    DESCRIPTION "Pre-break text"
QUESTION AVG? TYPE NUMERIC SIZE 3 NODECIMAL BLANKIFZERO
    PROMPT "Batting average:"
CALCULATION AVERAGE TYPE NUMERIC SIZE 3
    EXPRESSION "PLAYERS.B_HITS*1000/PLAYERS.B_ATBATS" 
    DESCRIPTION "Avg" FORMAT ".XXX"
SELECT AVERAGE GE AVG? AND B_ATBATS NE "0"
 
SORT BY TEAMNAME PAGEBREAK BY AVERAGE REVERSE
LINE REPORT_HEADER NOTSEPARATE
TEXT "BASEBALL STATS BY TEAM AND BATTING AVERAGE" COLUMN 1
			
LINE PRE-BREAK BREAKFIELD TEAMNAME
FIELD TEAMNAME COLUMN 2 JUST LEFT STRIP
FIELD HDR_TXT COLUMN 24 JUST LEFT
FIELD RT_HRUNS COLUMN 54 JUST RIGHT
			
LINE DETAIL
FIELD FLAG COLUMN 1 HEADER "" JUST LEFT IF D_COST GE "100"
FIELD LASTNAME COLUMN 4 HEADER "Player" JUST LEFT STRIPCHR ","
FIELD FIRSTNAME COLUMN 21 HEADER "" JUST LEFT
FIELD B_ATBATS COLUMN 35 HEADER "At bats" JUST RIGHT
FIELD B_HITS COLUMN 44 HEADER "Hits" JUST RIGHT
FIELD AVERAGE COLUMN 50 HEADER "AVG" JUST RIGHT
FIELD B_HR COLUMN 56 HEADER "Home runs" JUST RIGHT
FIELD D_COST COLUMN 67 HEADER "Cost" JUST RIGHT FORMAT "ZZZXK" TOTAL