Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Blank address lines
Message
From
10/11/2004 03:26:42
 
 
To
09/11/2004 18:10:02
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00959791
Message ID:
00959878
Views:
10
Did you know that you can simplify this with an old trick which is not commonly known, but which has been around since DOS days? Enter ONE line like this:
m.company
M.addr1;M.addr2;M.addr3;m.addr4;city,state,' '+zip
I'm sure you won't believe me, but this one line will do ALL the things you want! The semicolon means 'print the next word on a new line if it's not empty', the komma means 'trim the next words and separate them on one line with a space between them.


>I have a simple Report Form with a 6 line address
>
>m.company
>M.addr1
>M.addr2
>M.addr3
>m.addr4
>Alltrim(city)+" "+alltrim(state)+" "+zip
>
>They are memory variables from a scatter memvar in the Customer table that I use earlier in he program.
>
>On addr1 - addr4 fileds I have checked the box Remove line if blank.
>
>However when report runs, it does NOT take the blanks out and if any of the addr fields are empty, I get an empty line.
>
>Is this because I am using memory variables instead of the data fields?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform