View Full Version : report with two table

06-26-2002, 03:12 AM
in my project have two JTable.

JTable table1,table2;

is there any option to generate report with two seperate table & text from textfield.
is it then how can possible.
where i can get small example of this.


06-26-2002, 05:05 AM

multiple tables are not yet supported.

Have more fun anyway,
said Thomas

06-26-2002, 05:29 AM
Hi, Taqua

The answer was clear but for me the question was not really.
Do you mean that there is no possibility to have _visually_ two tables in one report? Or it is possible, but I have to 'extract' data for them from one TableModel?

Thank you.

06-26-2002, 07:07 AM

currently JFreeReport does only support a single datasource and Bands like (Group/Report/Page)-(Header/Footer) take the whole width of a page.

So having more than one table in one report is no option for almost every report I can imagine, except the structure of both data models is equal and you don't want to print the data next to each other.

I hope this cleared much of the current non-capabilites of JFreeReport. Even an improvement is promised for one of the next versions, a solution for this problem is not available for at least some weeks to months.

Have more fun,
said Thomas

05-01-2006, 08:51 AM
to use jfree report with two or more tables u can use velocity :) and use only labels ex:
#set($y=180+52 - 16)
#foreach($f in $items)
<label x="0" y="$y" width="27" height="12" alignment="right" >${f.get(0)}</label>
<label x="30" y="$y" width="180" height="12" alignment="left" >${f.get(1)}</label>
<label x="382" y="$y" width="70" height="12" alignment="right" >${f.get(n)}</label>
that works for me :D