Remote printing with LyciaWeb client in Lycia3.

There are two ways of print job handling in Lycia3, on the application server side and on the client side.

In the following 4GL code example ‘report1’ outputs will be printed on the default printer
on the Application Server side.

MAIN
START REPORT report1 TO printer
OUTPUT TO REPORT report1()
FINISH REPORT report1
END MAIN
REPORT report1()
FORMAT
ON EVERY ROW
PRINT "Printed by default printer on Application Server side."
END REPORT

In order for printer could be accessible by Lycia3 application server in the cloud,
some cloud print services / cloud ready printers should be installed and configured.
Installation and configuration processes are dependent of the cloud services provider and is out of the scope of this article.

It is also possible to generate report on the application server and process its outputs (e.g. open in new tab, download and print) on the client side.
fgl_report_type() function and Report Viewer Config element of the Lycia 3 Theme designer are used in the following 4GL code example to open report outputs in the new browser tab, download and print it on the client side by using corresponding menu command.

MAIN
MENU
COMMAND "NewTab"
CALL fgl_report_type("newTab","newTab")
START REPORT activity_report TO PIPE "newTab"
OUTPUT TO REPORT activity_report ()
FINISH REPORT activity_report


COMMAND "Download"
CALL fgl_report_type("download","download")
START REPORT activity_report TO PIPE "download"
OUTPUT TO REPORT activity_report ()
FINISH REPORT activity_report


COMMAND "Print"
CALL fgl_report_type("print","print")
START REPORT activity_report TO PIPE "print"
OUTPUT TO REPORT activity_report ()
FINISH REPORT activity_report


COMMAND "exit"
EXIT MENU
END MENU
END MAIN


REPORT activity_report()
FORMAT
ON EVERY ROW
PRINT "Processed on the client side."
END REPORT

Report Viewer Config:
Rem_print_rep_viewer_cfg

Click the link below to see
all KB articles by product.