56 lines
1.8 KiB
Plaintext
56 lines
1.8 KiB
Plaintext
|
|
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,
|
|
i int
|
|
MAIN
|
|
CALL restreport()
|
|
END MAIN
|
|
|
|
FUNCTION testreport()
|
|
|
|
CALL configureoutput("SVG") RETURNING handler
|
|
START REPORT prueba TO XML HANDLER HANDLER
|
|
|
|
FOR i = 1 TO 10
|
|
OUTPUT TO REPORT prueba()
|
|
END FOR
|
|
|
|
END FUNCTION
|
|
REPORT prueba()
|
|
FORMAT
|
|
ON EVERY ROW
|
|
PRINT "IMPRESION ", i
|
|
END REPORT
|
|
|
|
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_configureSVGPreview("PrintOnNamedPrinter")
|
|
CALL fgl_report_setSVGPrinterName("EPSON TM-T20II Receipt")
|
|
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
|
|
|
|
FUNCTION getPreviewDevice()
|
|
DEFINE fename String
|
|
CALL ui.interface.frontcall("standard", "feinfo", ["fename"],[fename])
|
|
IF fename == "Genero Desktop Client" THEN
|
|
RETURN "SVG"
|
|
ELSE
|
|
RETURN "PDF"
|
|
END IF
|
|
END FUNCTION
|
|
|