使用从sql查询中检索的数据创建静态报告模板

时间:2013-07-26 07:01:24

标签: jasper-reports

如何创建包含行组和列组的报告模板是静态的(静态文本),但是从sql查询中检索的数据的内容。

我的意思是这就像下面的例子。

 _____________________________________________________________________________
|             PENERIMAAN              |             PENGELUARAN               |
|_____________________________________|_______________________________________|
|      Description       |   Amount   |        Description       |   Amount   |
|________________________|____________|__________________________|____________|
| Group Description.1    |            | Group Description.3      |            |
| Description 1.1        |   450,000  | Description 3.1          |  1,250,000 |
| Description 1.2        |   850,000  | Description 3.2          |  4,780,000 |
| Description 1.3        | 1,650,000  | Description 3.3          |    950,000 |
| Description 1.4        | 2,250,000  | Description 3.4          |          - |
|________________________|____________|__________________________|____________|
| Group Description.2    |            | Group Description.4      |            |
| Description 2.1        |   550,000  | Description 4.1          |  1,120,000 |
| Description 2.2        | 1,850,000  | Description 4.2          |          - |
| Description 2.3        |   920,000  | Description 4.3          |     85,500 |
| Description 2.4        |         -  |                          |            |
|________________________|____________|__________________________|____________|
|                                GRAND TOTAL                                  |
|_____________________________________________________________________________|
|              8,520,000              |              8,100,000                |
|_____________________________________|_______________________________________|

注意:组说明&描述=静态文本; nominal / amount(numeric)=来自sql查询的字段。

对我来说有什么最好的解决方案吗?

1 个答案:

答案 0 :(得分:0)

将subReport放入金额字段。