设置 jasper 报告的类路径以查找本地化文件?
我有一个 grails 应用程序,我试图将所有 .jrxml
报告存储在 src/reports
中。由于我可以使用 jasper 编译器指向文件,因此效果很好。但是,现在我的报告需要本地化,并且每个报告都需要自己的本地化。
我在 src/reports
中有这样的包:com.stefankendall.blah.blah
com.stefankendall.ab
com.stefankendall.c
在 iReport 4.0.2 中,我可以在类路径上指定每个包的确切文件夹,但是我可以在正在运行的 grails 应用程序中执行此操作吗?
整理文档,我有这个:
src/reports/com/stefankendall/a/report1.jrxml
src/reports/com/stefankendall/a/report1_Bundle/report1.properties, report1_en_US.properties...
在我正在运行的应用程序中,report_Bundle
似乎没有出现在类路径,所以 jasper 报告炸弹。当我通过 groovy 调用 jasper 时,有没有办法指定此路径?或者,我可以以某种方式将 src/reports 添加到类路径并以某种方式从报告中向下钻取吗?
I have a grails application, and I'm trying to store all my .jrxml
reports in src/reports
. Since I can point at files with the jasper compiler, this works fine. However, now my reports need to be localized, and each report needs its own localization.
I have packages like this in src/reports
:com.stefankendall.blah.blah
com.stefankendall.a.b
com.stefankendall.c
In iReport 4.0.2, I can specify the exact folder of each bundle on the classpath, but can I do this within my running grails application?
Scraping together documentation, I have this:
src/reports/com/stefankendall/a/report1.jrxml
src/reports/com/stefankendall/a/report1_Bundle/report1.properties, report1_en_US.properties...
In my running application, report_Bundle
doesn't appear to be on the classpath, so the jasper reports bomb. Is there a way to specify this path when I'm invoking jasper through groovy? Alternatively, can I somehow add src/reports
to the classpath and drilldown somehow from the report?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能有更好的方法,但是......
There may be a better way, but...