我试图用这种BIRT重现一份报告:
我从XML
读取数据,让我们说它是这样的:
<list>
<item>
<table1>
<row>
<column1>item 1 table 1 row 1 col 1</column1>
<column2>item 1 table 1 row 1 col 2</column2>
</row>
<row>
<column1>item 1 table 1 row 2 col 1</column1>
<column2>item 1 table 1 row 2 col 2</column2>
</row>
</table1>
<table2>
<row>
<columnX>item 1 table 2 row 1 col 1</columnX>
<columnY>item 1 table 2 row 1 col 2</columnY>
<columnZ>item 1 table 2 row 1 col </columnZ>
</row>
<row>
<columnX>item 1 table 2 row 2 col 1</columnX>
<columnY>item 1 table 2 row 2 col 2</columnY>
<columnZ>item 1 table 2 row 2 col 3</columnZ>
</row>
</table2>
</item>
<item>
.
.
</item>
所以我试图重现这个:
+---------------------------+---------------------------+
| column 1 | column 2 |
+---------------------------+---------------------------+
|item 1 table 1 row 1 col 1 |item 1 table 1 row 1 col 2 |
|item 1 table 1 row 2 col 1 |item 1 table 1 row 2 col 2 |
.
|item 1 table 1 row N1 col 1|item 1 table 1 row N1 col 2|
+---------------------------+---------------------------+
+---------------------------+---------------------------+---------------------------+
| column X | column Y | column Z |
+---------------------------+---------------------------+---------------------------+
|item 1 table 2 row 1 col 1 |item 1 table 2 row 1 col 2 |item 1 table 2 row 1 col 3 |
|item 1 table 2 row 2 col 1 |item 1 table 2 row 2 col 2 |item 1 table 2 row 2 col 3 |
.
|item 1 table 2 row N2 col 1|item 1 table 2 row N2 col 2|item 1 table 2 row N2 col 3|
+---------------------------+---------------------------+---------------------------+
.
.
.
+---------------------------+---------------------------+
| column 1 | column 2 |
+---------------------------+---------------------------+
|item K table 1 row 1 col 1 |item K table 1 row 1 col 2 |
|item K table 1 row 2 col 1 |item K table 1 row 2 col 2 |
.
|item K table 1 row N1 col 1|item K table 1 row N1 col 2|
+---------------------------+---------------------------+
+---------------------------+---------------------------+---------------------------+
| column X | column Y | column Z |
+---------------------------+---------------------------+---------------------------+
|item K table 2 row 1 col 1 |item K table 2 row 1 col 2 |item 1 table 2 row 1 col 3 |
|item K table 2 row 2 col 1 |item K table 2 row 2 col 2 |item 1 table 2 row 2 col 3 |
.
|item K table 2 row N2 col 1|item k table 2 row N2 col 2|item 1 table 2 row N2 col 3|
+---------------------------+---------------------------+---------------------------+
我承认我是BIRT
的新手。这是我到目前为止所尝试的:
list
项导入为/list/
(固定的aboslute路径)(称为DataSet
)
导入column1
和column X
(只是因为我必须导入一些东西):
**这意味着数据集将采用这些表的第一行的值。DataSet1
,DataSet2
,DataSet3
)column1
(这是下表的第一个值)第二列包含一个表:
column 1
和column2
第三列包含另一个表
columnX
,columnY
和columnZ
作为列。结果我明白了:
<item>
中的每一行,我都会获得一行<item>
有什么想法吗?谢谢!