I am creating invoices and in the address sections I need to supress any line of the address that is left blank.
For example,
Address Line 1
Address Line 2
Address Line 3
Address Line 4
If only "Address Line 3" is blank in my report then I need to display the following:
Address Line 1
Address Line 2
Address Line 4
I cannot separate the sections and put a conditional surpress because there is other information on the same line further across the invoice, so I am trying to use a formula.
Here is what I tried, but anytime there is a blank line it doesn't work-----
StringVar Remitto;
Remitto := "";
IF {VW_CRYSTAL_INVOICE.REMIT_COMPANY} <> "" THEN
Remitto := ({VW_CRYSTAL_INVOICE.REMIT_COMPANY} + chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR1} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR1}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR2} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR2}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR3} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR3}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR4} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR4}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
Remitto
Thanks for your help!
For example,
Address Line 1
Address Line 2
Address Line 3
Address Line 4
If only "Address Line 3" is blank in my report then I need to display the following:
Address Line 1
Address Line 2
Address Line 4
I cannot separate the sections and put a conditional surpress because there is other information on the same line further across the invoice, so I am trying to use a formula.
Here is what I tried, but anytime there is a blank line it doesn't work-----
StringVar Remitto;
Remitto := "";
IF {VW_CRYSTAL_INVOICE.REMIT_COMPANY} <> "" THEN
Remitto := ({VW_CRYSTAL_INVOICE.REMIT_COMPANY} + chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR1} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR1}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR2} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR2}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR3} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR3}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
IF {VW_CRYSTAL_INVOICE.REMIT_ADDR4} <> "" THEN
Remitto := Remitto + ({VW_CRYSTAL_INVOICE.REMIT_ADDR4}+ chr(13) + chr(10))
ELSE
Remitto := Remitto;
Remitto
Thanks for your help!