Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: ToNumber Question Post Reply Post New Topic
Author Message
bobbabuoy
Newbie
Newbie


Joined: 10 Mar 2008
Location: United States
Online Status: Offline
Posts: 37
Quote bobbabuoy Replybullet Topic: ToNumber Question
     Posted: 01 Apr 2008 at 9:35am
I am working with a database that has an account "numbers" field that is string-typed.  I want to sort them numerically however they have a hyphen in them.  Is there a way around that?
IP IP Logged
andymc
Newbie
Newbie
Avatar

Joined: 17 Mar 2008
Location: United States
Online Status: Offline
Posts: 18
Quote andymc Replybullet Posted: 01 Apr 2008 at 1:28pm
Create a formula @AcctSort:
 
val(Replace{table.account},"-",""))
 
Use this formula as your sort field but display your original table field {table.account} on your report.
 
Andymc
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum