How to create a sub report in iReport?

0

I created a report in iReport, which in turn has a sub report. The problem is that it prints the sub report several times.

    Titulo 1 Titulo 2 Titulo 3 Titulo 4
    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
ESTO SON TODOS LOS REGISTROS DEL SUB-REPORTE

    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
ESTO SON TODOS LOS REGISTROS DEL SUB-REPORTE

    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
    valor 1 valor 2 valor 3 valor 4 
ESTO SON TODOS LOS REGISTROS DEL SUB-REPORTE

How can I make it print only once, the sub report?

I have added a new band detail but it does the same. If I add it in the band of sumary it only prints but the size that was given, does not dynamically increase the size as in the detail band.

Can you make it grow dynamically? Or what solution can I give?

    
asked by Ken 13.10.2016 в 05:48
source

2 answers

1

For the dynamism of the size you can only be in the detail, you try sending a list or datasource from java, it worked for me (I would not know the result if it is direct query sql)!

    
answered by 06.06.2017 в 14:10
0

The detail band is repeated with each datasource entry. You must include the subReport in one of the bands that do not repeat, header / footer or table.

    
answered by 13.10.2016 в 08:38