1. Cuando Trabajas con reportes:
Hay algunos parametros que le podes enviar a los reportes:
MODULE filename REPORT filename | The name of the file that is the report to be run, sometimes called a runfile. These files usually carry the .rdf or .rep suffix. REPORT and MODULE are synonymous, though REPORT is provided for backward compatibility. | |||
BATCH y/n | Whether Reports Runtime is running in batch. If so, no terminal input or output will be accepted. If not, the interactive window opens. | |||
USERID user/pwd@db | Valid user information for use when Reports Runtime accesses the database to create the report. | |||
PARAMFORM y/n | Determines whether Reports Runtime shows the runtime parameter form in the Reports Runtime interactive window when you run the report. Not used if BATCH=y. | |||
CMDFILE filename | The name of a file containing parameters and values for the execution of Reports Runtime. | |||
TERM termname | The type of terminal used to run Reports Runtime. Valid only when the report is run in character mode, on environments such as UNIX. | |||
ARRAYSIZE num | Size in K of the Oracle array Reports Runtime will use when executing the report. Usually a larger array helps reports process faster. Valid values for num range between 1 and 9999, default is 10. | |||
DESTYPE type | Specifies the destination of the report. Valid values for type include screen, file, printer, preview, sysout, and mail. | |||
DESNAME name | Name of a printer, filename, or Oracle Office username 1K in length that is the destination of the report. | |||
DESFORMAT fmt | Allows you to specify a printer driver for use when you specify DESTYPE to be a file. Also specifies characteristics of your printer identified by DESNAME. | |||
COPIES num | Specifies the number of copies Reports Runtime should produce. Only used if DESTYPE=printer. Valid values for num range between 1 and 9999, default is 1. | |||
CURRENCY char | A character symbol Reports Runtime will use to specify currency on a number. | |||
THOUSANDS char | A character symbol Reports Runtime uses to separate a number hundreds from thousands, hundred thousands from millions, etc. on a number (i.e., comma, as in 1,000,000 instead of 1000000). | |||
DECIMAL char | The character symbol Reports Runtime uses to indicate the decimal place in a number. | |||
READONLY y/n | Equivalent to set transaction read only, allows reports containing multiple select statements to have read consistency across them. | |||
LOGFILE filename | Name of a log file to which all screen prints of reports in character mode will be saved. Default is dfltrep.log. If the file already exists, its contents are not overwritten. Instead, new screen prints are added at the end. | |||
BUFFERS num | Amount of memory used to run your report. Default is 640K. Range is between 1 and 9999. | |||
PROFILE filename | The name of a file that stores performance statistics on the report execution. Items included in the profile include total elapsed time, total time Reports Runtime spent running, time spent connecting to Oracle, parsing, and fetching data, SQL processing time, and CPU time. | |||
RUNDEBUG y/n | Tells Reports Runtime to perform extra debugging to check for overwrite, layout, mode inconsistencies, or bind variable problems that don’t produce runtime errors but will make the report look bad. | |||
ONSUCCESS action ONFAILURE action | How Reports Runtime should end its transaction based on the success of failure of the report’s execution. Valid values for action include commit, rollback, and noaction. | |||
ERRFILE filename | File to which Reports Runtime writes all errors received this run. | |||
LONGCHUNK | Size in K of chunks Reports Runtime retrieves from LONG type columns. Default 10K. Range is between 1 and 9999. | |||
ORIENTATION dir | Orientation of report when printed. Valid values for dir include portrait, landscape, or default. | |||
BACKGROUND y/n | Specifies whether the report will be run as a background process. | |||
MODE md | Specifies whether report runs in bitmap or character mode. Valid values for md include bitmap, character, and default. | |||
PRINTJOB | Defines whether the print job dialog interface will appear before the report is run to define printer options. Will not work for background report runs or when DESTYPE=mail. | |||
AUTOCOMMIT y/n | Defines whether database changes should be committed automatically. | |||
NONBLOCKSQL y/n | Allows or disallows other programs to execute while report is being created. | |||
ROLE name/pwd | Specifies a role to be used when running this report. | |||
PAGESIZE num x num | Identifies size of report page in inches, centimeters, picas, or characters. |
2. Cerrar el report background desde el código del form:
2.1. Crea un PROCEDURE con el nombre que queras ponerle, en mi caso se llama CIERRA_REPORT_BACKGROUND.
2.2. Digita el siguiente código:
PROCEDURE CIERRA_REPORT_BACKGROUND IS
pl_id ParamList;
BEGIN
pl_id := Get_Parameter_List('CERRAR_RBE');
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('CERRAR_RBE');
Add_Parameter(pl_id, 'PARAMFORM', TEXT_PARAMETER, 'NO');
Add_Parameter(pl_id, 'ORACLE_SHUTDOWN', TEXT_PARAMETER, 'Yes');
Run_Product(REPORTS, 'cerrar_rbe', SYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
Destroy_Parameter_List( pl_id );
END;
Ahora solamente será necesario mandar a llamar el PROCEDURE cada vez que mande a imprimir un reporte desde el Form Builder.
No hay comentarios:
Publicar un comentario