java 动态 Jasper 报告

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2947467/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 23:37:03  来源:igfitidea点击:

Dynamic Jasper Report

javajasper-reports

提问by pramod

i need to create dynamic jasper report .

我需要创建动态碧玉报告。

my scenario is i have nearly 60 tables in database,so i can't create 60 jasper reports.i want a template jasper report which should be modified automatically by program.The data will come dynamically from the database and will be stored in an arraylist. iterating the arraylist i need to upload the data to jasper report. is that possible in java + jasper Reports. if so please give an example or any idea.

我的场景是我在数据库中有近 60 个表,所以我无法创建 60 个 jasper 报告。我想要一个模板 jasper 报告,它应该由程序自动修改。数据将从数据库动态获取,并将存储在数组列表中. 迭代 arraylist 我需要将数据上传到 jasper 报告。在 java + jasper Reports 中可以实现吗?如果是这样,请举一个例子或任何想法。

thanks pramod

谢谢普拉莫德

回答by Ricardo

Through DynamicReports you can create dynamic reports quickly and easily. Take a look at following step by steptutorial.

通过 DynamicReports,您可以快速轻松地创建动态报告。看看下面的分步教程。

回答by Jeshurun

In case you want to achieve this directly from JasperReports without having to learn to use another library have a look at the following tutorial available here.

如果你想从JasperReports的,而无需学习使用另一个库直接做到这一点看看下面的教程可以在这里

回答by Aristarchus

DynamicJasper(DJ) is the best and more well - documented solution in my opinion. It offers every feature of DynamicReports but also includes Struts2 and WebWork integration and a clean excel report. Read more at the site.

在我看来,DynamicJasper(DJ) 是最好的、有据可查的解决方案。它提供了 DynamicReports 的所有功能,还包括 Struts2 和 WebWork 集成以及干净的 Excel 报告。在网站上阅读更多内容。

回答by broschb

Another approach I have taken other than what @jeshurun has mentioned, is outlined in the following post. Both of these approaches have worked for me depending on what I needed.

除了@jeshurun 提到的方法之外,我采用的另一种方法在以下帖子中进行了概述。根据我的需要,这两种方法都对我有用。