Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Create field using portion of another field Post Reply Post New Topic
Author Message
troverman
Newbie
Newbie
Avatar

Joined: 01 Feb 2011
Location: United States
Online Status: Offline
Posts: 3
Quote troverman Replybullet Topic: Create field using portion of another field
    Posted: 13 Dec 2012 at 4:44am
Hi,

There is a field in a table which contains a string of data, then two spaces, and then another string of data. I need the first and second strings of data to become separate fields. I believe, using a formula, this can be done. However, aside from selecting the field in the formula window, I'm not sure how it can be done. I need to know which function or operator to use. Basically "take the first 8 characters of field x and create field y" if that makes sense. Then I need another formula which says "take the last 7 characters of field x and create field z."

Thanks in advance


Edited by troverman - 13 Dec 2012 at 4:46am
IP IP Logged
comatt1
Senior Member
Senior Member
Avatar

Joined: 19 May 2011
Online Status: Offline
Posts: 337
Quote comatt1 Replybullet Posted: 13 Dec 2012 at 5:19am
two formulas

y
left({field},8})

z
right({field},7})


if you find the spaces cause issue you can always use the trim() function to remove them.

Edited by comatt1 - 13 Dec 2012 at 5:20am
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.047 seconds.