Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Triming Post Reply Post New Topic
Author Message
SATELE01
Newbie
Newbie
Avatar

Joined: 13 Aug 2012
Location: United States
Online Status: Offline
Posts: 24
Quote SATELE01 Replybullet Topic: Triming
     Posted: 27 Sep 2012 at 4:49am

I have a field with the following value in it

 

10981000

 

I am trying to get this field on the report with the last six characters using the formula below

 

Right({Employee_job_History_SCD.Client_ID}, 6)

 

I get the following error with this code

 

A string is required here

 

Right({Employee_job_History_SCD.Client_ID}, 6)

 
The field is Client_ID(PK,Int, not null)
 
Any help would be appreciated
 
 
 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 27 Sep 2012 at 4:55am
right(totext({tble.field}, 0, ""),6)
 
you need to change the id field which is a number into a string.
 
HTH
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