Please enable JavaScript to view this site.

R:BASE 11 Help

Navigation: How To (Forms, Reports, and more) > Reports and Labels > Technical Documents

Creating Address Line Compression

Scroll Prev Top Next More

When creating address lines in reports, some addresses may not have a company, while others may not have a second address like "Suite 2". To prevent the empty spaces from appearing in the address lines there is an easy solution to compress the address using the Variable Memo control.

 

1.The first step is to define a report variable that contains all of the available column used for the address with each individual line separated with the (CHAR(013)) Function. The (CHAR(013)) function represents a carriage return, so when the address is printed, this portion will be sent to the line below. Between each of the columns and (CHAR(013)) functions a plus character is used to combine the text string.

 

The image below is an example of what the variable may look like.

 

LineCompressVar

 

Notice the first name and last columns are separated from the company column with the (CHAR(013)) function. The same applies for the custadd1, custadd2 columns. The last line inserts a comma and a space to correctly display the city state and zip line accurately.

 

2.Next, add a Variable Memo control to the report and assign the variable that contains the entire address in one string. In the example image above, the variable name is vAddress.

3.Then, right click on the Variable Memo control, and select "Suppress Empty Values" from the speed menu.

4.Now, save the report and test the address display.

 

This will create a fully dynamic address that will adjust for any missing lines.