I'm working on migration form Smart- to NG-Client. One thing I'm stuck on is the way of printing. I'm aware that printing directly from the browser is not possible. But it really not possible to print in NG Desktop-Client? At least I couldn't find a way to do that.
In the Smart-Client for example we used to print like this:
- Code: Select all
plugins.jasperPluginRMI.runReport(fs,
"myJasperReport.jasper",
"NameOfMyPrinter",
plugins.jasperPluginRMI.OUTPUT_FORMAT.PRINT,
parameterObjekt,
i18n.getCurrentLanguage() + "_" + i18n.getCurrentCountry())
The printer "NameOfMyPrinter" has all the required printer settings (such as the tray for example). So if I run this report, the output is sent directly to the printer and the output goes to the correct tray.
In the NG-Environment I check, if the user is in the "NG-Desktop"-Client:
- Code: Select all
plugins.ngdesktoputils.isNGDesktop()
and if so, I try the same code as above. But then I get a JavaScript-Error.
Is there another way to do so? Maybe get the ByteArray that will be produced by Jasper and then send this somehow to a methode? I didn't find something like that. Maybe someone else has a solution for that.
We use Jasper-Plugin Version 6.12.2 and Servoy 2020.12.0.3622
I would be grateful for any suggestion.
Many thanks in advance
Roland