I'm new in using Jasper and I'm practicing of creating programs for accounting. Jasper helps me to generate nice reports using SQL queries, but is there a any way to generate report using data's from jtable? Thank you!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Yes, you can build a JRDataSource from a table model using JRTableModelDataSource.
The names of the fields are the names of the columns returned by TableModel.getColumnNames()
. You may also use COLUMN_<index>
as field name.