Truncated Strings in crystal

I ended up using Mid(ExtractString ({shipdtl.ORDRELREF},"", "*"),4)



Sarah helped figure out I needed the "ExtractString" function to get the
field to truncate after the *. I really appreciate those who assisted.




Thank you,



Bruce Butler

IT Manager

Knappe & Koester, Inc.

_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Gerard Wadman
Sent: Thursday, April 26, 2007 1:35 PM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Truncated Strings in crystal



Bruce, If I were to assume that "BB" would be the starting point of your
string and you wanted a finite amount of characters to appear afterwards
then I would use the following formula.

Mid([TableName]![FieldName], InStr([TableName]![FieldName],"B"),5)

The result of this would be an output staring with the first "B" it
finds in the string and continuing for a total of five characters.

For Example, if the Table Name was Tab1 and the Field Name was SN and
the field data ="179QBB23456789"

The Formula: Mid([Tab1]![SN], InStr([Tab1]![SN],"B"),5 would
result in "BB234"

I hope this helps.

________________________________

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Thursday, April 26, 2007 9:51 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Truncated Strings in crystal

That is not quite what I am looking for. The * could be further in /
out, and not necessarily at 5 positions.

Bruce Butler

IT Manager

Knappe & Koester, Inc.

_____

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of RICH WAGNER
Sent: Thursday, April 26, 2007 9:36 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Truncated Strings in crystal

You can use the Left function.

Left ({table.field},5)

This will do it

Rich

_____

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Wednesday, April 25, 2007 4:40 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Truncated Strings in crystal

Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;

Ex.

StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.

I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.

Thank you,

Bruce Butler, IT Manager

Knappe & Koester, Inc. <http://www.knappe-koester.com
<http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > > > >

18 Bradco Street

Keene, NH

p. 603-355-1166

f. 603-355-2266

bbutler@... <mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>

The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;



Ex.



StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.



I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.



Thank you,



Bruce Butler, IT Manager

Knappe & Koester, Inc. <http://www.knappe-koester.com>

18 Bradco Street

Keene, NH

p. 603-355-1166

f. 603-355-2266

bbutler@...



The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.







[Non-text portions of this message have been removed]
HI Bruce -

You can use the "LEFT" function, it will return the number of characters specified from the left (start) of the string.

Liz


-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com]On Behalf Of Bruce Butler
Sent: Wednesday, April 25, 2007 01:40 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Truncated Strings in crystal



Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;

Ex.

StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.

I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.

Thank you,

Bruce Butler, IT Manager

Knappe & Koester, Inc. < http://www.knappe- <http://www.knappe-koester.com> koester.com>

18 Bradco Street

Keene, NH

p. 603-355-1166

f. 603-355-2266

bbutler@knappe- <mailto:bbutler%40knappe-koester.com> koester.com

The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.

[Non-text portions of this message have been removed]







[Non-text portions of this message have been removed]
You can use the Left function.

Left ({table.field},5)



This will do it



Rich

_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Bruce Butler
Sent: Wednesday, April 25, 2007 4:40 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Truncated Strings in crystal



Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;

Ex.

StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.

I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.

Thank you,

Bruce Butler, IT Manager

Knappe & Koester, Inc. <http://www.knappe-koester.com
<http://www.knappe-koester.com> >

18 Bradco Street

Keene, NH

p. 603-355-1166

f. 603-355-2266

bbutler@... <mailto:bbutler%40knappe-koester.com>

The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
That is not quite what I am looking for. The * could be further in /
out, and not necessarily at 5 positions.



Bruce Butler

IT Manager

Knappe & Koester, Inc.

_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of RICH WAGNER
Sent: Thursday, April 26, 2007 9:36 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Truncated Strings in crystal



You can use the Left function.

Left ({table.field},5)

This will do it

Rich

_____

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Wednesday, April 25, 2007 4:40 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Truncated Strings in crystal

Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;

Ex.

StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.

I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.

Thank you,

Bruce Butler, IT Manager

Knappe & Koester, Inc. <http://www.knappe-koester.com
<http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > >

18 Bradco Street

Keene, NH

p. 603-355-1166

f. 603-355-2266

bbutler@... <mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>

The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Hi Bruce,

Try using the Exract String function, this function extracts a string
from a start value to an end value, it you leave start value "", it will
start at beginning, for example:

ExtractString ({table.field},"", "*")

-Sarah

-----Original Message-----
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Bruce Butler
Sent: Thursday, April 26, 2007 9:51 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Truncated Strings in crystal

That is not quite what I am looking for. The * could be further in /
out, and not necessarily at 5 positions.



Bruce Butler

IT Manager

Knappe & Koester, Inc.

_____

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of RICH WAGNER
Sent: Thursday, April 26, 2007 9:36 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Truncated Strings in crystal



You can use the Left function.

Left ({table.field},5)

This will do it

Rich

_____

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Wednesday, April 25, 2007 4:40 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Truncated Strings in crystal

Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;

Ex.

StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.

I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.

Thank you,

Bruce Butler, IT Manager

Knappe & Koester, Inc. <http://www.knappe-koester.com
<http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > >

18 Bradco Street

Keene, NH

p. 603-355-1166

f. 603-355-2266

bbutler@... <mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>

The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]



Useful links for the Yahoo!Groups Vantage Board are: ( Note: You must
have already linked your email address to a yahoo id to enable access. )
(1) To access the Files Section of our Yahoo!Group for Report Builder
and Crystal Reports and other 'goodies', please goto:
http://groups.yahoo.com/group/vantage/files/.
(2) To search through old msg's goto:
http://groups.yahoo.com/group/vantage/messages
(3) To view links to Vendors that provide Vantage services goto:
http://groups.yahoo.com/group/vantage/links
Yahoo! Groups Links



<DIV><font size="1.5" face="Bookman Old Style">__________________________________________________________________________________________________________________

This email may contain material that is confidential, privileged and/or attorney work product for the sole use of the intended recipient. Any review, reliance or distribution by others or forwarding without express permission is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.
__________________________________________________________________________________________________________________<DIV><FONT>
Bruce, If I were to assume that "BB" would be the starting point of your
string and you wanted a finite amount of characters to appear afterwards
then I would use the following formula.



Mid([TableName]![FieldName], InStr([TableName]![FieldName],"B"),5)





The result of this would be an output staring with the first "B" it
finds in the string and continuing for a total of five characters.



For Example, if the Table Name was Tab1 and the Field Name was SN and
the field data ="179QBB23456789"



The Formula: Mid([Tab1]![SN], InStr([Tab1]![SN],"B"),5 would
result in "BB234"



I hope this helps.

________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Bruce Butler
Sent: Thursday, April 26, 2007 9:51 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] Truncated Strings in crystal



That is not quite what I am looking for. The * could be further in /
out, and not necessarily at 5 positions.

Bruce Butler

IT Manager

Knappe & Koester, Inc.

_____

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ] On
Behalf
Of RICH WAGNER
Sent: Thursday, April 26, 2007 9:36 AM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
Subject: RE: [Vantage] Truncated Strings in crystal

You can use the Left function.

Left ({table.field},5)

This will do it

Rich

_____

From: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
[mailto:vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com> ] On
Behalf
Of Bruce Butler
Sent: Wednesday, April 25, 2007 4:40 PM
To: vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] Truncated Strings in crystal

Does anyone know off hand how to truncate a string after a certain
character from within Crystal? Basically what I would like is the
following;

Ex.

StringFunction( "BB123* this is some extra text", '*' ) that would
return the value 'BB123'.

I expect there is a function to take care of that similar to how the
truncate function works with numbers, I just cannot find it.

Thank you,

Bruce Butler, IT Manager

Knappe & Koester, Inc. <http://www.knappe-koester.com
<http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> >
<http://www.knappe-koester.com <http://www.knappe-koester.com>
<http://www.knappe-koester.com <http://www.knappe-koester.com> > > >

18 Bradco Street

Keene, NH

p. 603-355-1166

f. 603-355-2266

bbutler@... <mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>
<mailto:bbutler%40knappe-koester.com>

The information in this message is proprietary and/or confidential and
is intended only for the use of the individual(s) named above. This
message should not be forwarded without permission from the author. If
this message is received in error or otherwise by someone other than the
addressee, please contact the author at the above number and return the
message or destroy it. In addition, the recipient of this data agrees to
abide by the United States Export Control of Technical Data and
Equipment under the International Traffic in Arms Regulations (ITAR) and
Export Administration Regulations (EAR). The recipient agrees to abide
by these laws and their regulations not only for export and re-export,
but for disclosure to non-U.S. citizens.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]