SpiReport loan invoice questions

Hi Grant,

In the detail band of my SpiReport loan invoice I have the specimen details: barcode, Collector last name, Fieldnumber, and type status. When I run the report in Specify it puts one specimen per page. How can I make it make a list without the page breaks?


Hi Grant,

The reason I was getting page breaks between my detail items was that I didn’t shrink my detail band to the height of my text box. Now it’s printing a list of my loan specimens.

I’m having a problem suppressing the blank lines in the Ship To address. I have checked “Blank when null” and “Remove line when blank”. Only the first line of the address has position “Fix relative to top”. The address lines below have psdition “Float” so that they can move up if there is a blank line. My address boxes are not touching any othere elements. There are no elements to the left or right which could interfere. For NCU lines Address4 and Address5 are blenk. I’m getting one blank line before the city and state. Any suggestions?


Hi Steve,

iReport does not support the ability to shrink the “title” area based on whether a single line does or does not have a value in it.

Due to the way that the reports and labels are structured, you have a hard-coded height in this section. The position of each expression is fixed, meaning they cannot move based on the value of others.

That being said, I belive you can create an expression that has line breaks at the end of each line to achieve the desired effect.

The new line character is "\n". You should be able to add that to the end of each line and put all of your expressions (ShippedTo, Herbarium, Address, Address2, etc.) into one large expression.

Hi Grant,

The address all in one text box:

So I modified the expression to leave out the line breaks when the address was null:

+“\n”+( isnull($F{Address4}) ? “” : $F{Address4}+“\n” )+

I got an error message saying the method isnull(String) is undefined. Can you correct my syntax?



I like the address in one text box. I couldn’t get the lines close enough together with each line in a separate box.

I disagree about iReport’s capabilities though. I think it’s just difficult to get it to do what it is supposed to do. That’s what “Remove line when blank” is for. Maybe the title section is an exception but I have the same address lines pasted in the detail section of a shipping label. It behaves the same way leaving one blank row for the two empty address lines. Whether the position of an expression is fixed or not depends on the Position Type setting which can be “Fixed relative to top”, “Fixed relative to bottom”, or “Float” (select an object right click and choose properties).