Feature #228
Setting the report folder programatically
0%
Description
Hi Patrick,
At Servoy World I asked you if it is possible that the report folder is set in code. I hope it will be in a future release.
Thank you,
Diana
History
Updated by Patrick Talbot about 14 years ago
As I said during SW 2011, this is not as obvious as it sounds: this location is used to find the macros, to serve temporary files (for web clients) and as a root location for templates, this is done when the server plugin is initialized...
Also, be aware that even if I was adding this capability to change the report folder with a 'setDefaultFolder()' method, it would be changed for all clients...
But maybe there is another (better way) to do this, so if you could explain further what you want to achieve, I could see what I can do and/or give you some advice on how to do it...
Updated by Patrick Talbot about 14 years ago
Hi Diana,
I think I have found a way to do this, the way the JasperReports plugin does (meaning this is only valid for one client session and it has to be set each time for each client session: this doesn't change the server value), but I'm still doubtful this is needed...
You haven't explained why you really need it...
The way I see it, it's very easy to set a relative template when you request a report, for example:
plugins.VelocityReport.previewReport("/template.html", getReportContext()); // will get it in the root folder (as set with the server property)
plugins.VelocityReport.previewReport("/users/user1/template.html", getReportContext()); // will get it in the /users/user folder inside the root folder
Don't you think that fit your needs already?
Updated by Patrick Talbot about 14 years ago
- Category set to overall
- Priority changed from Normal to Low
Updated by Patrick Talbot about 13 years ago
- Status changed from New to Closed
- Client type set to Any
- In developer? set to No
- Servoy version set to Any
- OS version set to Any
- Java version set to Any
No answer after 12 months, so I suppose you've implemented the way I suggested.
This functionality is not really needed I think.