Hello!
I have a "Location" field coming into my report from our sql database. It is coming in as a number, so I think for trimming and concatenation I might have to either convert it ToText or Cstr..?
This field ranges from 1 to 3 integers (ex. 7,10,601, etc) but I need it to be a fixed length of 4, with zeros being added to the left. For example, using my example above, this is what my new field would look like:
0007
0010
0601
So the number of zeros being added to its left would depend on what the Location is. If the location is just 7, then I would need to add 3 zeros to the left, if it's 601 then I would only need to add one.
I thought I would have to add a set number of zeros to the left first, and then trim the field so that the length is only four, but my formulas aren't coming out right.
Any ideas??
Thanks!
I have a "Location" field coming into my report from our sql database. It is coming in as a number, so I think for trimming and concatenation I might have to either convert it ToText or Cstr..?
This field ranges from 1 to 3 integers (ex. 7,10,601, etc) but I need it to be a fixed length of 4, with zeros being added to the left. For example, using my example above, this is what my new field would look like:
0007
0010
0601
So the number of zeros being added to its left would depend on what the Location is. If the location is just 7, then I would need to add 3 zeros to the left, if it's 601 then I would only need to add one.
I thought I would have to add a set number of zeros to the left first, and then trim the field so that the length is only four, but my formulas aren't coming out right.
Any ideas??
Thanks!