Safe Cast in Crystal Reports Comparison Using Crystal Reports version 14.0.3.613RTM

With SQL Server 2012 onward, if a field has both number and string data, I can use try_convert to compare, i.e.

TRY_CONVERT(int, resource_code) &gt; 999999999


How do I handle this in Crystal Reports?

I tried:

ToNumber({sch_resource.resource_code})


But if resource_code isn't a number, CR barfs.
Thanks to the comment by beccasue, I found the solution:

Using a Nested If with IsNumeric and ToNumber worked.

Example of nested Crystal Reports if statement copied from a SO question:
Nested if else in Crystal Reports


if {table1.id} &lt;&gt; 1 then
   (if {table1.name} &lt;&gt; "a" then
      var1 := "Hello"
   else
      var1 := "Hi";)
else
   var1 := "Bye";