Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Text field range selection Post Reply Post New Topic
Author Message
vsyriac
Newbie
Newbie


Joined: 22 Jun 2010
Location: United States
Online Status: Offline
Posts: 13
Quote vsyriac Replybullet Topic: Text field range selection
     Posted: 19 Jul 2010 at 8:26am

Hi,

The database field is text(string), but the field content is numeric.  I wanted to do the record selection based on the  range (> and < ) on this field in crystal reports. 
 
Can anyone help me.
Regards,
 
Vincent
Crystal Novice
IP IP Logged
jad1991
Newbie
Newbie
Avatar

Joined: 17 Jun 2010
Location: United States
Online Status: Offline
Posts: 5
Quote jad1991 Replybullet Posted: 19 Jul 2010 at 9:19am
Create a formula which looks like this:     Tonumber(your field name).
This changes the text field to a number field and you can do your <  or > in the record selection criteria by selecting the new formula field instead of the text field.
Crystal Gal
IP IP Logged
vsyriac
Newbie
Newbie


Joined: 22 Jun 2010
Location: United States
Online Status: Offline
Posts: 13
Quote vsyriac Replybullet Posted: 19 Jul 2010 at 10:12am
Does it matter when is it an input field?  (?input field)   ?
Crystal Novice
IP IP Logged
jad1991
Newbie
Newbie
Avatar

Joined: 17 Jun 2010
Location: United States
Online Status: Offline
Posts: 5
Quote jad1991 Replybullet Posted: 21 Jul 2010 at 7:40am
I had a policy number field that was defined as a string and I used the following in the record selection criteria and it worked.
 
{BINTPLCY.I_POLICY_NBR} in {?PolNbr}
 
 (It wouldn't let me use the "Tonumber" on the input field.)
Crystal Gal
IP IP Logged
vsyriac
Newbie
Newbie


Joined: 22 Jun 2010
Location: United States
Online Status: Offline
Posts: 13
Quote vsyriac Replybullet Posted: 21 Jul 2010 at 1:09pm
Convert {?PolicyNumber} to cdbl({?PolicyNumber}) and store as a formula
@PolicyNumber.  Then do the comparison.
 
This is the method I used
Crystal Novice
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