Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Numeric Filter

Status
Not open for further replies.

mrichey

MIS
Nov 22, 2002
71
US
Is there a formula that can be used to search a field and filter out all non-numeric data? Thank you!
 
Try something like this

whileprintingrecords;
local stringvar result:="";

local numbervar code := length({Field});

local numbervar n := 1;



while n <= code do
(
if {Field}[n] in [Totext(0),Totext(1),Totext(2),Totext(3),Totext(4),Totext(5),Totext(6),Totext(7),Totext(8),Totext(9)] then result = result + &quot;&quot; else
result = result + {Field}[n];

n:= n+1;
);
result;


Ian Waterman
UK Crystal Reports Consultant
 
Sorry not thinking no need for totext(), just put numbers in &quot;&quot;, eg &quot;2&quot;.

Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top