Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Change a number field to text Post Reply Post New Topic
Author Message
crystalsonic
Groupie
Groupie


Joined: 26 Jan 2012
Online Status: Offline
Posts: 46
Quote crystalsonic Replybullet Topic: Change a number field to text
    Posted: 26 Jan 2012 at 5:55am
I am running Crystal XI and I need to change a field on a report from a number to text based on a condition. The number field in the database is either a zero or a 1. On the report I would for the zero to display as YES and for the 1 to display as NO. Is this done via the HIGHLIGHT expert or the Formula Workshop?
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jan 2012 at 6:04am

Field Explorer

formula field
right click select new
if table.field=0 then 'YES' else if table.field=1 then 'NO' else 'ERROR'
 
Or place the field on the report
right click on it
select format field
Common tab
display string formula box
if currentfieldvalue=0 then 'Yes' else if currentfieldvalue=1 then 'No' else 'Error'
IP IP Logged
crystalsonic
Groupie
Groupie


Joined: 26 Jan 2012
Online Status: Offline
Posts: 46
Quote crystalsonic Replybullet Posted: 26 Jan 2012 at 6:28am
Thanks for your help! It worked great! :)
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.031 seconds.