What range of values are speaking of? Is it a stored or computed value? (What field type?) VFP only handles so many digits in it's floatingpoint calculations, and if you need more you'll need a third party library to handle the bigger numbers.
The chances are that this problem comes about because the field in which you are trying to display the number is not wide enough. If you can widen the field, it might work. Worth a try, at least.
mgagnon, rgbean,MikeLewis,
Thank you all for the input. Here is what I was doing wrong.
I would bring in a numeric field from a remote view and it would display just fine. The field was N(11,0) and the range was from 1 to 99,999,999,999.
I needed to convert to Char and pad to the left with '0' out to the 11th placeholder. Here was my formula...
RIGHT(REPLICATE('0',11)+ALLTRIM(STR(ndc_num)),11), which of course worked fine on numbers out to the 10th placeholder. What I was missing was in the STR() function where I needed to indicate the length and optionally the decimal places. Well I have been doing this program since 4am and I was getting kind of goofy. I'm sure you've been there.
Here is what the formula needed to look like...
RIGHT(REPLICATE('0',11)+ALLTRIM(STR(ndc_num,11,0)),11).
Live and learn, right?
I appreciate the three of you offering your assistance.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.