RW_RPTCOPY

Copy a report definition

WTSupported in traditional Synergy on Windows

 

USupported on UNIX
VSupported on OpenVMS
xcall RW_RPTCOPY(source_file, source_name, [dest_file], [dest_name][, sts])

Arguments

source_file

The name of the source report definition file. (a64)

source_name

The name of the report from the source file to copy. (a40)

dest_file

(optional) The name of the destination report definition file. (a64)

dest_name

(optional) The name of the report to store in dest_file. (a40)

sts

(optional) The error status: (d1)

0 = Success

1 = Failure

Discussion

This subroutine copies the specified report from the source report definition file to the destination report definition file. (They can be the same file, as long as the report names are unique.) If you don’t specify the destination definition filename, RPTDAT:reports.rpt, is used. If you don’t specify the destination report name, the source report name is used. If a report already exists with that name, an error is returned.

This subroutine uses approximately 4K of global memory.

Examples

The following call copies the report A/R_MASTER from the file reports.rpt and stores it in the file myrpts.rpt with the name MY_A/R.

xcall rw_rptcopy("reports.rpt", "A/R_MASTER", "myrpts.rpt", "MY_A/R")

This call copies the report PAYROLL from the file reports.rpt and stores it in the file myrpts.rpt, keeping the same name.

xcall rw_rptcopy("reports.rpt", "PAYROLL", "myrpts.rpt")