Terry,
>I have an SQL Select driven report in which I use a custom function to calculate one of the fields. The returned values are typically between 0 & 31 ( care days ). The problem that arrises ( as you have no doubt already sermised) is that the early returns are 1 digit 0 - 9 and later when one comes allong that is double digit 10 - 31 the table receives * for out of range. How do I squach this pest.
I assume you are returning a numeric value from the custom function. I just tried this:
SELECT *, dsnum() AS numb FROM labels
DISP STRU
DSNUM.PRG contains:
RETURN 1
You get a 1-digit numeric field, but changing to
"RETURN 0001"
you get a 4-digit numeric field.