Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula to change the results of data

Status
Not open for further replies.

pereda1

IS-IT--Management
Jun 13, 2005
2
US
Hello everyone,

Here is my question, I have a total of 10 rooms e.g.
Room1 GEN
Room2 ANE
Room3 VAS
Room4 EME
and so forth, how can i display on my Crystal Report to only show the Room number and not the wording after e.g.

I want these results
Room1
Room2
Room3
Room4
Thank you in advance
 
Create a formula and use:

left({table.field},instr({table.field}," ")-1)

In later versions you can use:

split({table.field}," ")[1]

Please remember to post your software version to avoid wasting time in the future.

-k
 
first, what version of cr do you use?
is your Room1 or so on is same length on left side?
there is couple of way to achieve this.
create the formula field and use left function for example.
trim(left{table.field name},6)).
this is one of the easiest way
 
kspiderman: read my post, both are simple, and will always produce the desired results because of the space between.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top