Set report main file

Command groupFlag affectedReversibleExecute on clientPlatform(s)
Report parametersNONONOAll

Syntax

Set report main file
 
file-name

Description

This command specifies the main file for the current report. When a report is printed, Omnis uses the main file set by the last Set main file. Set report main file overrides the main file setting by specifying a new main file specifically for the report. The setting remains in force until the next Set report name.

Printing connected files

When printing connected files, it is essential that the child file is made the main file. Only the main file and its connected parent files are automatically read into the current record buffer.

If no sort fields are specified in the report class, the report generator steps through the records in the order defined by the record sequencing number for the main file. Sort fields let you reorder the report records.

Example

# Set the main file to fAccounts for the report rMyReport

Set report name
 
rMyReport

Set report main file
 
fAccounts

Clear sort fields
Set sort field
 
fAccounts
.
Surname

Prompt for destination
Print report
 

 
# Alternatively, you can use notation to set the main file

Do
 
$clib.$reports
.
rMyReport
.
$mainfile.$assign
(
'fAccounts'
)