The better way to storage jasper reports.

What is the better way to storage the reports and make it accesible from desktop and webclient, because the webclient application is executed in the server, and the smart client is executed in the computer of each user, for this reasons the 2 paths are different. Are any solution to make one unic path?

The reports have to be in servoy server, whatever client (smart or web) you use. You have to define the path in Server Admin > Server Plugins > jasperPluginRMI > directory.jasper.report.

But, in Developer, the path to the reports is a local path, so you have to “sync” local reports directoy and server directory if you need to test reports in developer and in client.

Regards,

We place the reports in the media directory of a solution/module. In this way the reports are automatically sync with your team-provider and are also part of your solution. When deploying the application server we have a method that will get those reports from the repository and store them in the report directory. At startup we check if you are in developer-mode and if so we change the directoy to the media directory of the module.

if (application.isInDeveloper()== true) {
var $workSpace = java.lang.System.getProperty(“osgi.instance.area”)
if (globals._ayu_isMac()) {
if ($workSpace.substr(0, 5) == ‘file:’) {
$workSpace = $workSpace.substr(5)
}
} else if ($workSpace.substr(0, 6) == ‘file:/’) {
$workSpace = $workSpace.substr(6)
}
plugins.jasperPluginRMI.reportDirectory = $workSpace + ‘rep_reports/medias’
}

regards,

Danny Richardson

But this solution is not usefull for me, because i want to run in production mode, not in developer. What i need is to know the path to the server folder of the solutions. But actually i don’t know how to go for example to one modules folder. I used these isntructions:

application.getServerURL() and plugins.jasperPluginRMI.reportDirectory but i don’t know how to make the entire path.