Skip to Content
0
Jan 06, 2023 at 02:38 PM

Multi-line Fields in Crystal Reports

39 Views Last edit Jan 06, 2023 at 01:04 PM 7 rev

I am working on a report in Crystal Reports 2016. The table used by the report, USER_ADDR, stores the addresses in its ADDRESS column, storing additional information about the address (ex: apartment #) in a second line.

USER_ADDR Table

| ACCOUNT_ID | ADDRESS_LINE | ADDRESS |
|------------| -------------|---------| 

|     1      |       1      | 12 A St | 

|     1      |       2      | Apt 102 |

|     2      |       1      | 54 B St |

|     3      |       1      | 62 C St |

I am using the field USER_ADDR.ADDRESS to show the address, but it only shows the first address line, which does not show the complete address if an account has an ADDRESS_LINE of 2.

I'm not quite sure how to resolve this issue. My questions are:

  1. How would I go about making a formula in Crystal Reports to show all lines of the ADDRESS column when an ACCOUNT_ID has an address where ADDRESS_LINE = 1 and 2.

or

2. How would I make a formula that only includes an ACCOUNT_ID's address where ADDRESS_LINE = 2

For reference, these are the main columns of my report:

| Account    | Address Line 1 | Address Line 2 |
|------------| ---------------|----------------| 

What I've tried: opened the Format Editor and selected the "Can Grow" option, hoping that would allow ADDR.ADDRESS to be multi-line but that did not work.