Can you provide an example of how this fgl_report_setOutputFileName function is used? I tried some different options, but no luck. There's not a lot of documentation on it, other than it's suppose to be used with the fgl_report_selectPreview function.
Using your code example, something like ...
CALL fgl_report_SelectDevice("PDF")
CALL fgl_report_selectPreview(FALSE)
CALL fgl_report_setOutputFileName("myname")
LET p_handler = fgl_report_commitCurrentSettings()
LET p_stat = fgl_report_RunReportFromProcessLevelDataFile(p_handler, p_filename)
... you should end up with myname.pdf