I have a situation where I have very limited access to the directory structure of the server. Servoy is hosted by a host company.
When I change my solution I can make a servoy solution file and import this within the application server. But how about my reports? These reports are not in the Servoy file.
I already asked to provide a possibility in the Application Server to make it possible to upload reports like we can upload beans and plugins.
But I would also like to have a possibility to deploy my reports with my solution. So the best way would probably a possibility that the reports are in the Servoy solution file. Is that possible?
And maybe you have some other solution for that. Please let me know.
Another problem is that my reports are prefixed with a prefix that determines the solution. It would be great if in case of deployment only the reports are in the solutionfile that belongs to that solution (and the included modules). Any suggestions to this situation are welcome as well.
I originally said “plugins.http.getPageData” in my previous post, but I did mean “plugins.http.getMediaData”, I corrected this above.
You can put every file you want in your media library. At the clients side, you can get it out using the http-plugin, as I said before. After that, you can write it to disk using the file-plugin and treat it like any other file.
Well, you don’t have to enter the location where the reports are stored, you can also leave that field in the preferences empty and use the entire path to the report-file in your plugin call.
So if you store your report in the media library (where usually only the images go), you can get it out using the http-plugin, write it to a place where you do have access (like the home directory) and run your report from there:
var _file = plugins.http.getMediaData("media:///<reportfile>");
var _path = plugins.file.getHomeDirectory() + "/<reportfile>";
plugins.file.writeFile(_path, _file);
plugins.jasperPluginRMI.jasperReport(controller.getServerName(), _path, null, 'viewer', null);
You can just create your own Webclient solution to upload files to a global variable. From there, in a method, you can write the files to a directory on your server using the file plugin, since all the business logic is executed ServerSide.