Skip to main content
Participant
September 17, 2008
Answered

Pound sign creating error

  • September 17, 2008
  • 1 reply
  • 947 views
I have some pound signs in one of my output fields that are causing an error in the Report Builder. I've tried doing a Replace, but just can't seem to get the syntax correct.

Original code:
query.Action & Chr(13) & Chr(10) & IIf(query.Material NEQ '', DE(query.Material), DE(query.ContainerSize))

Tried doing a Replace like this:
query.Action & Chr(13) & Chr(10) & IIf(query.Material NEQ '', DE(Replace(query.Material, '#', 'No.')), DE(query.ContainerSize))
This topic has been closed for replies.
Correct answer cpeterson
Figured it out:

query.Action & Chr(13) & Chr(10) & IIf(query.Material NEQ '', DE(Replace(query.material, '##', 'No. ', 'ALL')), DE(query.ContainerSize))

Needed the double pound signs.

1 reply

cpetersonAuthorCorrect answer
Participant
September 17, 2008
Figured it out:

query.Action & Chr(13) & Chr(10) & IIf(query.Material NEQ '', DE(Replace(query.material, '##', 'No. ', 'ALL')), DE(query.ContainerSize))

Needed the double pound signs.