JasperReports: Show line between two enteries, but not after the last record

jasper-reports

Solution

Put the line at the top of the detail band instead of the bottom, then change the printWhenExpression to `$V{REPORT_COUNT}.intValue() != 1`.

The line will then be printed before each entry except for the first one, essentially putting a line between each entry.

Problem

I an using JasperReports to download some content in pdf format. I fetched some data from the database and add a textField in the Detail band to show the entries of a particular column. This is what I am getting and if I add a line than pdf changed to but my requirement is to show line between two entries. I want to remove last line and the pdf should looks like

Original source