46 lines
1.8 KiB
Plaintext
46 lines
1.8 KiB
Plaintext
{
|
|
FUNCION : dashboard.4gl
|
|
DESARROLLADOR :ING. JUAN SOTO
|
|
OBJETIVO : PRESENTAR GRAFICAS INFORMATIVAS A TIPOS DE USUARIOS ESPECIFICADOS
|
|
EN LA TABLA DE SEGURIDAD SEG0003 DONDE LA COLUMNA <presenta_board> es <SI>
|
|
SE DEBE ESPECIFICAR EL NOMBRE DEL 4RP para generar la informacion,
|
|
EL TIPO DE DASH QUE VA A PRESENTAR
|
|
}
|
|
IMPORT os
|
|
|
|
FUNCTION dashboard(dboard,nombreDash,tipoDash)
|
|
DEFINE dboard,nombreDash,tipoDash STRING,
|
|
existe INT
|
|
|
|
DEFINE handler om.SaxDocumentHandler, -- return value from fgl_report_commitCurrentSettings()
|
|
r_filename STRING, -- filename of Report Design Document including .4rp extension
|
|
r_output STRING, -- output format option
|
|
preview INTEGER -- TRUE/FALSE, to set preview option
|
|
|
|
IF dboard = "SI" THEN
|
|
LET existe = os.Path.exists(nombreDash)
|
|
IF existe = 1 THEN
|
|
LET preview = FALSE
|
|
LET r_filename = nombreDash
|
|
-- configure report engine; the functions prefixed fgl that are called here are part of the GRW API
|
|
IF fgl_report_loadCurrentSettings(r_filename) THEN -- load the .4rp file
|
|
|
|
# CALL fgl_report_selectDevice(r_output) -- changing default
|
|
# CALL fgl_report_selectPreview(preview) -- changing default
|
|
|
|
LET handler = fgl_report_commitCurrentSettings() -- commit changes
|
|
END IF
|
|
--run the report
|
|
IF handler IS NOT NULL THEN -- report engine was configured ok
|
|
|
|
START REPORT generadash TO XML HANDLER HANDLER
|
|
|
|
|
|
END IF
|
|
|
|
FINISH REPORT generadash
|
|
END IF
|
|
END IF
|
|
|
|
|
|
END FUNCTION |