ARform.RDL ship to address cleanup to remove blanks

16 Views Asked by At

I am trying to clean up our companies ARForm.rdl before our relaunch and am trying to figure out a way to remove all the blanks in the shipto address fields.

in the Bill to Address area I changed the code to =REPLACE(REPLACE(REPLACE(REPLACE(Fields!Calc_BillToAddressList.Value, "~~~~",""),"~~~",""),"~~",""),"~",VBCRLF + " ")

This works perfect however in the ship to there is something different happening that I do not understand, and it expands the field to include all the blanks.

=iif(Fields!Calc_MulShipTo.Value = false, split(Fields!Calc_ShipToAddressList.Value, "~")(0).ToString(), "(SEE BELOW)") + vbcrlf + iif(Fields!Calc_MulShipTo.Value = false, Code.GetShipTo( 1, split( Fields!Calc_ShipToAddressList.Value, "~") ), "") + vbcrlf + iif(Fields!Calc_MulShipTo.Value = false, Code.GetShipTo( 2, split( Fields!Calc_ShipToAddressList.Value, "~") ), "") + vbcrlf + iif(Fields!Calc_MulShipTo.Value = false, Code.GetShipTo( 3, split( Fields!Calc_ShipToAddressList.Value, "~") ), "") + vbcrlf + iif(Fields!Calc_MulShipTo.Value = false, Code.GetShipTo( 4, split( Fields!Calc_ShipToAddressList.Value, "~") ), "") + vbcrlf + iif(Fields!Calc_MulShipTo.Value = false, Code.GetShipTo( 5, split( Fields!Calc_ShipToAddressList.Value, "~") ), "")

I tried the following but it repeats the first line of the address otherwise functions very well.

=iif(Fields!Calc_MulShipTo.Value = false, split(Fields!Calc_ShipToAddressList.Value, "~")(0).ToString(), "(SEE BELOW)") + vbcrlf + iif(Fields!Calc_MulShipTo.Value = false, REPLACE(Fields!Calc_ShipToAddressList.Value, "~",VBCRLF + " "), "")

Any suggestions.

Thanks Dan "SSRS Weekend Warrior"

0

There are 0 best solutions below