在没有 iReport 的情况下使用 JasperReports
我想使用JasperReports作为报告库,但我不能使用iReport(正如我从一些站点了解到的那样),因为与数据库的连接和我的请求是通过Java完成的(我做了一些复杂的计算)。
我见过很多使用 iReport 的例子,但我还没有见过没有它的例子。
另外,我的报告应该包含很多图表,手动编写所有这些内容很痛苦,因为我会生成很多报告和图表!
我的问题:
- 有一个例子如何做到这一点吗? (我正在使用Java和JSF。)
- 可以使用iReport吗? :)
I would like to use JasperReports as a reporting library, but I can't use iReport (as I have learned from some sites), because the connection to the database and my requests are done from Java (I have done some complex calculations).
I have seen a lot of example that use iReport but I haven't seen one without it.
Also my reports should contain a lot of charts, it is painful to write all of that manually because I will generate a lot of reports and charts!!
My questions:
- Is there an example how to do that? (I am using Java and JSF.)
- Is a possible to use iReport? :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
嗯,我刚刚注意到这个问题是在 6 年前提出的...将在这里留下我的答案作为参考。
如果我理解正确的话,您希望在不使用 Ireport 或 Jaspersoft Studio 的情况下创建 Jaspersoft 报告。由于报告模板本质上是 XML,因此这是可能的。有关结构的更多信息...请参阅:https://www.tutorialspoint.com /jasper_reports/index.htm
要将报告从源代码编译为已编译的报告,您可以使用 IReport 或 Jaspersoft Studio。不过,这也可以通过 Java 代码完成,如下所示: https:// /www.developer.com/java/getting-started-with-jasperreport.html 此参考基于互联网上的快速搜索。
希望这有帮助。
亲切的问候。
Mmmh, I just noticed this question was asked more then 6 years ago... Will leave my answer here as reference.
If I understand correctly you want to create Jaspersoft reports without using Ireport or Jaspersoft Studio. As the report templates are in essence XML this is possible. For more information on the structure... see amongst other : https://www.tutorialspoint.com/jasper_reports/index.htm
To compile the report from it's source to the compiled report you can use IReport or Jaspersoft Studio. This can however also be done from Java code as shown here: https://www.developer.com/java/getting-started-with-jasperreport.html This reference is based on a quick search on the internet.
Hope this helps.
Kind regards.