Mailing Label - Repeater Table

I have created a mailing label report to diaplay staff address details using repeater table as explained in the Cognos Report Studio guide from IBM. It is working perfectly fine and I have used the following settings in Cognos 8.4 -

Across 2 (Columns) Down 7 (Rows) to display 14 labels on 1 sheet of Avery L7163. I have used 'Top to bottom, left to right' approach for displaying the data from my query.

The issue which I am facing is if the query returns 6 or less than 6 fields, the report does not display the labels properly. Instead of leaving blank space for the 7th label in column 1, it scatters the 6 values on thecolumn and when I print it does not come properly.

Is there any setting which can control this issue. For example, if only 5 values are returned, it should place them in 5 label boxes in 1 column and leave the others blank rather than scattering the 5 on the whole column 1.

Popular White Paper On This Topic

You need to do a bit of maniputaltio of the strings using strings and if then else
Lets assume that your address label has lines address1, address2, address3, address4, addrs5, and addres6
You must check each line
For address line 1
If (address1 = '' and address2 = '' and address3 = '' and address4 = '' and address5 = '' ) then (address6)
Else if (address1 = '' and address2 = '' and address3 = '' and address4 = '') then (addres5)
?
Else (address1)

If you know certain columns will always have data then you can skip the in you if . then .. else if .. then .. else if .. then .. else
You just keep moving the data up the columns, its tedious and boring but the only way to remove the blank lines, you eventually end up with 6 columns the last few contain blanks if there is not enough data.

Thanks Terry for your quick reply, appreciated...I was thinking if there was some setting in the repeater table property that can fix this issue...I will give the suggested solution a go and will let you know if it works or not...

Thank you for the suggested solution. While trying to implement it, I noticed the ‘Size & Overflow’ property listed under ‘Positioning’ in the Repeater Table properties section.
It was selected as 100 % Height and Width by default. Out of curiosity, I left it blank and ran my query, it worked :)
So, without using the conditional statement, I was able to move the data into the desired label space by fixing this positioning property. Thanks again for your help, appreciated.