Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

suppressing lines - address line printing

Status
Not open for further replies.

rk68

Programmer
Jul 15, 2003
171
IN
I'm using CR8. I've created a report which prints a details of each individual on seperate page (just like the credit card statement). I have to print address of each individual which I have done in Group header. The address is of 7 lines but not all lines contain data. I don't want to print the blank address lines, instead print the next address line which has data. For eg. if there is data in line 1, line 4, line 5 & line 7 then the address will be printed in this manner.
line 1
line 4
line 5
line 7
I have tried using the if condition but then trying all the permutation & combination makes the formula too big. Is there any other way to overcome this issue ? I cannot have multiple sub group headers as I have other information to be printed on the right.

TIA
Raj
 
Hi Raj,
That's not much of a problem - I've done it.

Put each line in a separate section (e.g. Details 1, Details 2 or whatever). Then for each section, Format section with Suppress blank section.

Good luck,
Jeff
 
Thnks Jeff for the reply, but that won't work, as I have already mentioned in my earlier post that I need to print some other info across the line on the right side of the report. So creating sub headers/details etc. won't help.

TIA
Raj
 
Hi, sorry I missed that.

If you don't want to use a subreport for the address, then maybe you could try doing the whole address in one formula. E.g.(basic syntax)

address = ""
if not(IsNull(line1)) then
address=address + chr(13) + line1
end if

if not(IsNull(line2)) then
address=address + chr(13) + line2
end if

etc.
The chr(13) is for a line feed. If you always have eg line1, then you could start with address = line1. If you don't then you will probably have to add a counter/Boolean to check if this is the first line with real data and suppress the chr(13) for the first line.

I think this should work. I've used similar tricks before.
Jeff
 
Another method is to drop a field into a text box, enter a return, drop the next field, enter a return, etc. Then right click on the text box->format text->common->check "suppress embedded field blank lines". If you resize the text box to be small, but with "can grow" checked (on the same screen), the text box will adjust size to fit the number of lines, also.

-LB
 
thanks lbass. I tried exactly what you have said & it did work.

Thanks
RAJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top