Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
972 views
in Technique[技术] by (71.8m points)

jasper reports - Jaspersoft : Extra space at the end of table in detail band

I am using jaspersoft studio 5.6. I created a table in detail band to display data from database (it expands to many pages). And when in the new page, at some point, it generates extra space at the end. You can see in the image I uploaded here, when in record 23rd, it generates extra space below, but from 25th it not. Can someone help me on this problem? It make me confuse.

jrxml file

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Ok, this is what happens according to me (can't test but you can)

  1. Your detail band is height=65
  2. Your table is at y=15 height=50

If you do not have enough rows your table will never arrive to height=50, so since detail band is 65 you will have the space below the table, hence table starts at 15, runs for 2 rows give height=40, there will be 10 space until detail band ends.

Solution:

Make the height of your table as 1 row in it 20!, and reduce the detail band to fit height=35

The tag you need to change on the table is:

<componentElement>
   <reportElement x="0" y="15" width="511" height="20" uuid="b3d3ccdb-1d82-4bb3-81f6-e0690e70519b">
  • tag on detail band

    <detail>
     <band height="35" splitType="Stretch">
    

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...