here is the scenario:
In the database (hospital patient data) I am running report against, the social security numbers coming out of the table are in this format:
230,901,438 (I know, its insane. The field is also a number)
which after applying this:
Picture (ToText (, 0, ""), "xxx-xx-xxx")
comes out nicely as 230-90-1438
Here is the problem though: If the SSN starts with a zero, it looks like this:
70,401,384
which translates to (after applying the formatting):
704-01-384 which is not good.
So my problem is how do I format this thing if it starts with a zero, or two zero's? Any ideas would be much appreciated.
local stringvar x = right("00" + totext(Get an error that point out that:
picture(x, "xxx-xx-xxxx")
is not part of the formula. I am looking for a missing bracket or paranthesis, but don't see any. Any suggestion.
if for some reason lockwelle's answer does not cover it all this should handle it even if it is all all zeros.
picture(totext(Edited by DBlank - 26 Jul 2012 at 9:33am
put a ; after the first line. silly me sorry bout thatyep that did it. Wished I had 5 years of Crystal Coding experience instead of 5 months. Thanks a lot, guys, for the quick replies.
This page was generated in 0.047 seconds.