Can I use JTable data for a Jasper report

I am new to using Jasper and I am developing accounting software. Jasper helps me create nice reports using SQL queries, but is there a way to generate a report using data from jtable? Thanks!

+6
source share
1 answer

Yes, you can create a JRDataSource from a table using JRTableModelDataSource .

Field names are the names of the columns returned by TableModel.getColumnNames() . You can also use COLUMN_<index> as the field name.

+6
source

Source: https://habr.com/ru/post/917994/


All Articles