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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting address block

Status
Not open for further replies.

itkyle

IS-IT--Management
Feb 13, 2002
31
US
I have an address block on a form that is currently laid out by placing each component on its own line separately, so that if a field is blank, a blank space appears on the report. I'd like to create a formula that contains all of the fields, and also eliminates blank lines for missing pieces (for example, ADDR_2 might not contain any data).

My fields look like this currently:

MAIL_TO
NAME
ADDR_1
ADDR_2
CITY, ST ZIP (formula here already)

Thanks for any help you can give.
 
Hello...

Something like this should work... Might be a better way however..

IF NOT ISNULL(MAIL_TO) THEN
MAIL_TO + ASC(013) <--- Double check. I believe that is a return
ELSE
IF NOT ISNULL(NAME) THEN.. etc...

Brian
 
If you put this in one formula it will be a lot of work - you will have to allow the possibility of any given field being NULL.

When I have to do this I put each &quot;line&quot; of the address in its own section (so if your address block is going to be in the GH1 section, create sections below it so that you have GH1A, GH2A, GH3A, and so on...

Then put each line in one of the sections and condition the sections to suppress if the &quot;line&quot; is null. This will make it so that you wont have blank spaces between the lines and your addresses will &quot;roll up&quot; nicely to the correct format.

hope this helps!

LMC
cryerlisa@hotmail.com
 
Did you know you can drag all your address fields into a text box. You can set the &quot;suppress embedded field blank lines&quot; properties of the text box to suppress any gaps.

This method eliminates the need to have multiple sections or place everything in a formula.

Hope this helps.
Steve Fairclough
I.T. Manager
 
that is very interesting - do you know if it handles NULL as well as blank?
 
My mistake - these *are* null fields, and after moving them into a text box and selecting to suppress embedded blank fields lines, the report still shows a placeholder for those fields (it's not eliminating the empty line).

Any other ideas, aside from adding the group footers (I'll do that if I have to, but would rather leave this block in the page footer).

Thanks again for all your suggestions.
 
if your address block is to be in your page footer you can do the same thing as I said above - just create multiple PF sections (PFa, PFb, and so on) and do it that way. Be sure to set it so that it keeps it all together.

LMC
cryerlisa@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top