Hi DBlank,
I have borrowed a formula from Issue 57 of Crystal Clear( News and Hints for Cryatl Reports) by Chelsea Technologies:
@sort_order_num
local numbervar digit;
local numbervar v;
local stringvar s;
local numbervar i;
v :=0;
for i := 1 to len({LIX.ID}) do (
s:= mid({LIX.ID},i,1);
if isnumeric(s) then
digit := val(s);
v:= v*10 + digit;
);
v
This works for both prefix and suffix.
John
Edited by johnwsun - 30 May 2009 at 10:20pm