Page 1 of 1

DecimalToString

Posted: Tue Feb 21, 2012 1:56 pm
by Raftsman
My requirement is to convert a decimal to a string as follows;

001 = 1
002 = 2

but I need the following result for this one

000 = 0

I used the suppress_zero but end up with a NULL field. How do I go about keeping the 0

Thanks

Posted: Tue Feb 21, 2012 2:28 pm
by DSguru2B
If Isnull() then zero else whatever.

Posted: Tue Feb 21, 2012 2:34 pm
by Raftsman
I am using a Stage Variable to setup the field as follows

IF IsNull(DSLink1208.SALARY_STEP_NUMBER) or DSLink1208.SALARY_STEP_NUMBER = '' THEN 'UM' ELSE DecimalToString(DSLink1208.SALARY_STEP_NUMBER,"fix_zero,suppress_zero")

I am getting 'UM' back when the source is 000.

Posted: Tue Feb 21, 2012 6:30 pm
by qt_ky
Like DSGuru2B suggested, change 'UM' to '0'.