53 lines
2.0 KiB
Plaintext
53 lines
2.0 KiB
Plaintext
|
|
FUNCTION configureReport(x_filename,x_output,x_preview)
|
|
|
|
DEFINE x_filename STRING
|
|
DEFINE x_output STRING
|
|
DEFINE x_preview BOOLEAN
|
|
DEFINE x_handler om.SaxDocumentHandler
|
|
|
|
-- configure report engine; the functions prefixed fgl that are called here are part of the GRW API
|
|
|
|
IF fgl_report_loadCurrentSettings(x_filename) THEN -- load the .4rp file
|
|
CALL fgl_report_selectDevice(x_output) -- changing default
|
|
CALL fgl_report_selectPreview(x_preview) -- changing default
|
|
LET x_handler = fgl_report_commitCurrentSettings() -- commit changes
|
|
ELSE
|
|
LET x_handler = NULL
|
|
END IF
|
|
|
|
RETURN x_handler
|
|
|
|
END FUNCTION
|
|
|
|
{FUNCTION configureOutput(tipo_file)
|
|
DEFINE tipo_file CHAR(3)
|
|
IF NOT fgl_report_loadCurrentSettings(NULL) THEN
|
|
RETURN NULL
|
|
END IF
|
|
--CALL fgl_report_selectLogicalPageMapping("multipage")
|
|
--CALL fgl_report_configureMultipageOutput(2, 4, TRUE)
|
|
CALL fgl_report_setPageMargins("1.5cm","0.0cm","2.5cm","0.5cm")
|
|
--CALL fgl_report_selectDevice("XLS")
|
|
# CALL fgl_report_selectDevice(getPreviewDevice())
|
|
CALL fgl_report_selectDevice(tipo_file)
|
|
CALL fgl_report_selectPreview(TRUE)
|
|
RETURN fgl_report_commitCurrentSettings()
|
|
END FUNCTION}
|
|
FUNCTION configureOutput(tipo_file)
|
|
DEFINE tipo_file CHAR(3)
|
|
IF NOT fgl_report_loadCurrentSettings(NULL) THEN
|
|
RETURN NULL
|
|
END IF
|
|
# CALL fgl_report_selectLogicalPageMapping("multipage")
|
|
# CALL fgl_report_configureMultipageOutput(2, 4, TRUE)
|
|
CALL fgl_report_setPageMargins("0.5cm","0.5cm","0.5cm","0.5cm")
|
|
--CALL fgl_report_selectDevice("XLS")
|
|
# CALL fgl_report_selectDevice(getPreviewDevice())
|
|
#CALL fgl_report_configureCompatibilityOutput(1,'Franklin Gothic Heavy',false,'existencia',NULL,NULL)
|
|
CALL fgl_report_selectDevice(tipo_file)
|
|
CALL fgl_report_configurexlsxdevice(null,null,null,false,false,null,1)
|
|
CALL fgl_report_selectPreview(TRUE)
|
|
RETURN fgl_report_commitCurrentSettings()
|
|
END FUNCTION
|