You are here: Development Standards > Routines > General Routines > GENRPTDF.PUB

# GENRPTDF.PUB

GENRPTDF.PUB is a public program that performs several functions related to report default processing.

GET_REPORT_DEFAULT:

This entry point retrieves the default pick criteria for a given report.

`1005 GET_REPORT_DEFAULT:`
`1010 ENTER FILE[ALL],PROGRAM$,PARAMETER$,RMRD$,PICK$,DFLT_FOUND,LOAD_FLAG,ABANDON$`

Variable | Description
FILE[ALL] | Standard file array
PROGRAM$ | Program name to retrieve defaults for.
PARAM$ | Program parameter to retrieve defaults for.
RMRD$ | String template for the RMRDx file.
PICK$ | Template dimensioned to the pick screen defaults template. This includes default values found in the RMRDx file.
DFLT_FOUND | Returns a 1 if a default pick criteria is found, 0 if not.
LOAD_FLAG | Returns a 1 if one or more pick screen criteria are found, 0 if not.
ABANDON$ | Template dimensioned to the pick screen defaults template. No default values are loaded into this template.

Exit Points | Explanation
EXIT | This callpoint does not normally return an error.
EXIT ERR | This callpoint returns any untrapped errors.

SAVE_REPORT_DEFAULTS:

This entry point is provided for report criteria to be saved to the RMRDx file.

`2005 SAVE_REPORT_DEFAULTS:`
`2010 ENTER FILE[ALL],PROGRAM$,PARAMETER$,RMRD$,PICK$,OSGUI$`

Variable | Description
FILE[ALL] | Standard file array
PROGRAM$ | Program name to retrieve defaults for.
PARAM$ | Program parameter to retrieve defaults for.
RMRD$ | String template for the RMRDx file.
PICK$ | Template dimensioned to the pick screen defaults template. This includes default values found in the RMRDx file.
OSGUI$ | Standard GUI string template

Exit Points | Explanation
EXIT | This callpoint does not normally return an error.
EXIT ERR | This callpoint returns any untrapped errors.

COPY_DEFAULTS:

This entry point will copy a specified default and copy it to another user, or multiple users.

`2505 COPY_DEFAULTS:`
`2510 ENTER FILE[ALL],FRMUSER$,TOUSER$,PROGRAM$,PARAMETER$,DESCR$,DFLT$,DATA$,OSGUI$`

Variable | Description
FILE[ALL] | Standard file array
FRMUSER$ | User to copy from
TOUSER$ | User to copy to. If set to "ALL", then all users are copied to.
PROGRAM$ | Program name to retrieve defaults for.
PARAM$ | Program parameter to retrieve defaults for.
DESCR$ | Screen criterial name to look for.
DFLT$ | Set "Y" if criteria is to be made the default criteria
DATA$ | Actual data in pick screen template.
OSGUI$ | Standard GUI string template

Exit Points | Explanation
EXIT | This callpoint does not normally return an error.
EXIT ERR | This callpoint returns any untrapped errors.

LOAD_REPORT_DEFAULTS:

This entry point will prompt the user for which pick screen default to load.

`3005 LOAD_REPORT_DEFAULTS:`
`3010 ENTER FILE[ALL],PROGRAM$,PARAMETER$,RMRD$,PICK$,OSGUI$,DFLT_FOUND`

Variable | Description
FILE[ALL] | Standard file array
PROGRAM$ | Program name to retrieve defaults for.
PARAM$ | Program parameter to retrieve defaults for.
RMRD$ | String template for the RMRDx file.
PICK$ | Template dimensioned to the pick screen defaults template. This includes default values found in the RMRDx file.
OSGUI$ | Standard GUI string template
DFLT_FOUND | Returns a 1 if a default pick criteria is found, 0 if not.

Exit Points | Explanation
EXIT | This callpoint does not normally return an error.
EXIT ERR | This callpoint returns any untrapped errors.

DELETE_USER:

This entry point will delete a specified user and their report defaults for a given report, or for all reports.

`4005 DELETE_USER:`
`4010 ENTER FILE[ALL],USER$,PROG$,PARAM$`

Variable | Description
FILE[ALL] | Standard file array
USER$ | Specific user ID to delete. If blank and PROG$ is not blank, all defaults for the specified report are removed.
PROG$ | Specific program to delete. If blank and USER$ is not blank, all defaults for the specified user are removed.
PARAM$ | Report parameter.

Exit Points | Explanation
EXIT | This callpoint does not normally return an error.
EXIT ERR | This callpoint returns any untrapped errors.