Comma between City and State

I do not have much knowledge of Crystal and we do not use states but why
don't you put every state in an array?
Search in the address for a string equal to one of the states in the array
and put a comma in front of it. I do not know the exact commands in Crystal
but I am sure this works and should not take more than 5 lines of code.

Ronald van der Linden
Macroscoop BV

-----Original Message-----
From: Thad Jacobs [mailto:tjacobs@...]
Sent: Thursday, March 21, 2002 5:30 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Re: Comma between City and State


This formula looks from the right to the left, but unfortunately assumes
that the correct state abbreviation is used. The amount of spaces in the
city name will have no bearing on the replacement of the space with the
comma. However, a two word state name will present problems.

Thaddeus

--- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> This is the Revised, corrected version. The numbers were a little
mixed up
> in the last one....
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR4}), "
> ", InStrRev (trim({quotehed.QUOTEADDR4}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR5 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR5}), "
> ", InStrRev (trim({quotehed.QUOTEADDR5}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
> -----Original Message-----
> From: Thad Jacobs [mailto:tjacobs@k...]
> Sent: Tuesday, March 19, 2002 3:44 PM
> To: 'vantage@y...'
> Subject: [Vantage] re: Comma between City and State
>
>
> The problem is that the "city, state zip" field will float between
> quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
> depending on the population of address2 and address3.
> So the solution is to verify that the next address field
contains "USA", and
> replace the space after the city with a ", ".
>
> To complicate things further, a city name may have more than one
space, you
> must look at the second space from the right.... So here's the
formulas. I
> think it may be the ugliest one I've written yet...
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR6 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
>
> Simple enough, eh?
>
> HTH,
>
> Thaddeus
>
> -----Original Message-----
> From: dans@t... [mailto:dans@t...]
> Sent: Tuesday, March 19, 2002 11:21 AM
> To: Vantage Group (E-mail)
> Subject: [Vantage] Comma between City and State
>
>
> Novice Crystal Writer here.
> Â
> Can anyone tell me how to insert a comma between the city and state
in our
> crystal quote form? It is one field not 2.
> Â
> I may be worse than a novice but boss is bugging me.
> Â
> Thanks,
>
> Daniel C. Spoerl
> Estimator/MIS
> Toledo Metal Spinning Co.
> Phone: (419) 535-5931 ext. 203
> Fax:Â Â Â (419) 535-0565Â
> Personal E-fax: (707) 897-1708Â
> Email:Â Â Â HYPERLINK
> "mailto:dans@t..."dans@t...
> WebSite: HYPERLINK
> "http://www.toledometalspinning.com/"http://www.toledometalspinning.
com
>
HYPERLINK "http://www.toledometalspinning.com/products_configurator.ht
m" \n
>
>
>
> Â
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002
>
>
>
> [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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
> 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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/



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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Novice Crystal Writer here.
Â
Can anyone tell me how to insert a comma between the city and state in our
crystal quote form? It is one field not 2.
Â
I may be worse than a novice but boss is bugging me.
Â
Thanks,

Daniel C. Spoerl
Estimator/MIS
Toledo Metal Spinning Co.
Phone: (419) 535-5931 ext. 203
Fax:Â Â Â (419) 535-0565Â
Personal E-fax: (707) 897-1708Â
Email:Â Â Â HYPERLINK
"mailto:dans@..."dans@...
WebSite: HYPERLINK
"http://www.toledometalspinning.com/"http://www.toledometalspinning.com
HYPERLINK "http://www.toledometalspinning.com/products_configurator.htm" \n



Â

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002



[Non-text portions of this message have been removed]
There might be more than one way to do this, but when someone here
insisted that there be a comma we went into the city field (Customer
master)
and added a comma after the city. It didn't sway anyone here but the
current postal rules specifically request that no punctuation be used...



-----Original Message-----
From: dans@... [mailto:dans@...]
Sent: Tuesday, March 19, 2002 1:21 PM
To: Vantage Group (E-mail)
Subject: [Vantage] Comma between City and State


Novice Crystal Writer here.
Â
Can anyone tell me how to insert a comma between the city and state in our
crystal quote form? It is one field not 2.
Â
I may be worse than a novice but boss is bugging me.
Â
Thanks,

Daniel C. Spoerl
Estimator/MIS
Toledo Metal Spinning Co.
Phone: (419) 535-5931 ext. 203
Fax:Â Â Â (419) 535-0565Â
Personal E-fax: (707) 897-1708Â
Email:Â Â Â HYPERLINK
"mailto:dans@..."dans@...
WebSite: HYPERLINK
"http://www.toledometalspinning.com/"http://www.toledometalspinning.com
HYPERLINK "http://www.toledometalspinning.com/products_configurator.htm" \n
If a comma is not absolutely necessary, you just desire city and state to be
on the same line separated by a space you can accomplish this in country
maintenance. That will make the default format be whatever you specify.
Otherwise it is possible by a combination of country maintenance and by
using a crystal formula TrimRight ({<city>}) + ‘ , ‘ + {<state>}

Terry L. Williams I.S. Manager Chipsco, Inc. 9936 Liberty St. Ext.
Meadville, PA 16335 p.8143336331 x236 f.8143372548 tlw@...
<mailto:tlw@...> www.chipsco.com <http://www.chipsco.com/>

-----Original Message-----
From: Matt Finn [mailto:matt@...]
Sent: Tuesday, March 19, 2002 3:32 PM
To: 'vantage@yahoogroups.com'
Subject: RE: [Vantage] Comma between City and State

There might be more than one way to do this, but when someone here
insisted that there be a comma we went into the city field (Customer
master)
and added a comma after the city. It didn't sway anyone here but the
current postal rules specifically request that no punctuation be used...



-----Original Message-----
From: dans@... [mailto:dans@...]
Sent: Tuesday, March 19, 2002 1:21 PM
To: Vantage Group (E-mail)
Subject: [Vantage] Comma between City and State


Novice Crystal Writer here.

Can anyone tell me how to insert a comma between the city and state in our
crystal quote form? It is one field not 2.

I may be worse than a novice but boss is bugging me.

Thanks,

Daniel C. Spoerl
Estimator/MIS
Toledo Metal Spinning Co.
Phone: (419) 535-5931 ext. 203
Fax: (419) 535-0565
Personal E-fax: (707) 897-1708
Email: HYPERLINK
"mailto:dans@..."dans@...
WebSite: HYPERLINK
" http://www.toledometalspinning.com/" http://www.toledometalspinning.com
HYPERLINK " http://www.toledometalspinning.com/products_configurator.htm" \n





Yahoo! Groups Sponsor
ADVERTISEMENT

<http://rd.yahoo.com/M=215002.1818248.3328688.1261774/D=egroupweb/S=17050071
83:HM/A=847665/R=0/*http://ads.x10.com/?bHlhaG9vbW9uc3RlcjcuZGF0=1016573240%
3eM=215002.1818248.3328688.1261774/D=egroupweb/S=1705007183:HM/A=847665/R=1>


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

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .


[Non-text portions of this message have been removed]
Really, is that true, there should be not be a comma between the city and
state on mailing addresses?



[Non-text portions of this message have been removed]
The problem is that the "city, state zip" field will float between
quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
depending on the population of address2 and address3.
So the solution is to verify that the next address field contains "USA", and
replace the space after the city with a ", ".

To complicate things further, a city name may have more than one space, you
must look at the second space from the right.... So here's the formulas. I
think it may be the ugliest one I've written yet...

*Replace QUOTEADDR3 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);


IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR3}

*Replace QUOTEADDR4 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR4}



*Replace QUOTEADDR6 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR5}


Simple enough, eh?

HTH,

Thaddeus

-----Original Message-----
From: dans@... [mailto:dans@...]
Sent: Tuesday, March 19, 2002 11:21 AM
To: Vantage Group (E-mail)
Subject: [Vantage] Comma between City and State


Novice Crystal Writer here.
Â
Can anyone tell me how to insert a comma between the city and state in our
crystal quote form? It is one field not 2.
Â
I may be worse than a novice but boss is bugging me.
Â
Thanks,

Daniel C. Spoerl
Estimator/MIS
Toledo Metal Spinning Co.
Phone: (419) 535-5931 ext. 203
Fax:Â Â Â (419) 535-0565Â
Personal E-fax: (707) 897-1708Â
Email:Â Â Â HYPERLINK
"mailto:dans@..."dans@...
WebSite: HYPERLINK
"http://www.toledometalspinning.com/"http://www.toledometalspinning.com
HYPERLINK "http://www.toledometalspinning.com/products_configurator.htm" \n



Â

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002



[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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
The problem is that the "city, state zip" field will float between
quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
depending on the population of address2 and address3.
So the solution is to verify that the next address field contains "USA", and
replace the space after the city with a ", ".

To complicate things further, a city name may have more than one space, you
must look at the second space from the right.... So here's the formulas. I
think it may be the ugliest one I've written yet...

*Replace QUOTEADDR3 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);


IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR3}

*Replace QUOTEADDR4 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR4}



*Replace QUOTEADDR6 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR5}


Simple enough, eh?

HTH,

Thaddeus

-----Original Message-----
From: dans@... [mailto:dans@...]
Sent: Tuesday, March 19, 2002 11:21 AM
To: Vantage Group (E-mail)
Subject: [Vantage] Comma between City and State


Novice Crystal Writer here.
Â
Can anyone tell me how to insert a comma between the city and state in our
crystal quote form? It is one field not 2.
Â
I may be worse than a novice but boss is bugging me.
Â
Thanks,

Daniel C. Spoerl
Estimator/MIS
Toledo Metal Spinning Co.
Phone: (419) 535-5931 ext. 203
Fax:Â Â Â (419) 535-0565Â
Personal E-fax: (707) 897-1708Â
Email:Â Â Â HYPERLINK
"mailto:dans@..."dans@...
WebSite: HYPERLINK
"http://www.toledometalspinning.com/"http://www.toledometalspinning.com
HYPERLINK "http://www.toledometalspinning.com/products_configurator.htm" \n



Â

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002



[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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
This is the Revised, corrected version. The numbers were a little mixed up
in the last one....

*Replace QUOTEADDR3 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);


IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR3}

*Replace QUOTEADDR4 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR4}), "
", InStrRev (trim({quotehed.QUOTEADDR4}), " ") -1);

IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR4}



*Replace QUOTEADDR5 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR5}), "
", InStrRev (trim({quotehed.QUOTEADDR5}), " ") -1);

IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR5}

-----Original Message-----
From: Thad Jacobs [mailto:tjacobs@...]
Sent: Tuesday, March 19, 2002 3:44 PM
To: 'vantage@yahoogroups.com'
Subject: [Vantage] re: Comma between City and State


The problem is that the "city, state zip" field will float between
quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
depending on the population of address2 and address3.
So the solution is to verify that the next address field contains "USA", and
replace the space after the city with a ", ".

To complicate things further, a city name may have more than one space, you
must look at the second space from the right.... So here's the formulas. I
think it may be the ugliest one I've written yet...

*Replace QUOTEADDR3 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);


IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR3}

*Replace QUOTEADDR4 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR4}



*Replace QUOTEADDR6 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR5}


Simple enough, eh?

HTH,

Thaddeus

-----Original Message-----
From: dans@... [mailto:dans@...]
Sent: Tuesday, March 19, 2002 11:21 AM
To: Vantage Group (E-mail)
Subject: [Vantage] Comma between City and State


Novice Crystal Writer here.
Â
Can anyone tell me how to insert a comma between the city and state in our
crystal quote form? It is one field not 2.
Â
I may be worse than a novice but boss is bugging me.
Â
Thanks,

Daniel C. Spoerl
Estimator/MIS
Toledo Metal Spinning Co.
Phone: (419) 535-5931 ext. 203
Fax:Â Â Â (419) 535-0565Â
Personal E-fax: (707) 897-1708Â
Email:Â Â Â HYPERLINK
"mailto:dans@..."dans@...
WebSite: HYPERLINK
"http://www.toledometalspinning.com/"http://www.toledometalspinning.com
HYPERLINK "http://www.toledometalspinning.com/products_configurator.htm" \n



Â

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002



[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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
This is the Revised, corrected version. The numbers were a little mixed up
in the last one....

*Replace QUOTEADDR3 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);


IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR3}

*Replace QUOTEADDR4 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR4}), "
", InStrRev (trim({quotehed.QUOTEADDR4}), " ") -1);

IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR4}



*Replace QUOTEADDR5 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR5}), "
", InStrRev (trim({quotehed.QUOTEADDR5}), " ") -1);

IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR5}

-----Original Message-----
From: Thad Jacobs [mailto:tjacobs@...]
Sent: Tuesday, March 19, 2002 3:44 PM
To: 'vantage@yahoogroups.com'
Subject: [Vantage] re: Comma between City and State


The problem is that the "city, state zip" field will float between
quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
depending on the population of address2 and address3.
So the solution is to verify that the next address field contains "USA", and
replace the space after the city with a ", ".

To complicate things further, a city name may have more than one space, you
must look at the second space from the right.... So here's the formulas. I
think it may be the ugliest one I've written yet...

*Replace QUOTEADDR3 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);


IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR3}

*Replace QUOTEADDR4 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR4}



*Replace QUOTEADDR6 with a formula containing the text:

numberVar SecondSpaceFromRight := InStrRev (trim({quotehed.QUOTEADDR3}), "
", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);

IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
else
{quotehed.QUOTEADDR5}


Simple enough, eh?

HTH,

Thaddeus

-----Original Message-----
From: dans@... [mailto:dans@...]
Sent: Tuesday, March 19, 2002 11:21 AM
To: Vantage Group (E-mail)
Subject: [Vantage] Comma between City and State


Novice Crystal Writer here.
Â
Can anyone tell me how to insert a comma between the city and state in our
crystal quote form? It is one field not 2.
Â
I may be worse than a novice but boss is bugging me.
Â
Thanks,

Daniel C. Spoerl
Estimator/MIS
Toledo Metal Spinning Co.
Phone: (419) 535-5931 ext. 203
Fax:Â Â Â (419) 535-0565Â
Personal E-fax: (707) 897-1708Â
Email:Â Â Â HYPERLINK
"mailto:dans@..."dans@...
WebSite: HYPERLINK
"http://www.toledometalspinning.com/"http://www.toledometalspinning.com
HYPERLINK "http://www.toledometalspinning.com/products_configurator.htm" \n



Â

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002



[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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
I don't think it can be done consistently, especially if the city has
two words and the state has two. For example, New York New York.

If the state is abbreviated (New York NY) then possibly. In Progress
it would be..

CityCommaState = substring(CityState,1,r-index(CityState," ")) + ", "
+ substring(CityState,r-index(CityState," "))

Crystal is not my forte, but doesn't InStrRev work like r-index?

Lonnie

--- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> This is the Revised, corrected version. The numbers were a little
mixed up
> in the last one....
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR4}), "
> ", InStrRev (trim({quotehed.QUOTEADDR4}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR5 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR5}), "
> ", InStrRev (trim({quotehed.QUOTEADDR5}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
> -----Original Message-----
> From: Thad Jacobs [mailto:tjacobs@k...]
> Sent: Tuesday, March 19, 2002 3:44 PM
> To: 'vantage@y...'
> Subject: [Vantage] re: Comma between City and State
>
>
> The problem is that the "city, state zip" field will float between
> quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
> depending on the population of address2 and address3.
> So the solution is to verify that the next address field
contains "USA", and
> replace the space after the city with a ", ".
>
> To complicate things further, a city name may have more than one
space, you
> must look at the second space from the right.... So here's the
formulas. I
> think it may be the ugliest one I've written yet...
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR6 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
>
> Simple enough, eh?
>
> HTH,
>
> Thaddeus
>
> -----Original Message-----
> From: dans@t... [mailto:dans@t...]
> Sent: Tuesday, March 19, 2002 11:21 AM
> To: Vantage Group (E-mail)
> Subject: [Vantage] Comma between City and State
>
>
> Novice Crystal Writer here.
> Â
> Can anyone tell me how to insert a comma between the city and state
in our
> crystal quote form? It is one field not 2.
> Â
> I may be worse than a novice but boss is bugging me.
> Â
> Thanks,
>
> Daniel C. Spoerl
> Estimator/MIS
> Toledo Metal Spinning Co.
> Phone: (419) 535-5931 ext. 203
> Fax:Â Â Â (419) 535-0565Â
> Personal E-fax: (707) 897-1708Â
> Email:Â Â Â HYPERLINK
> "mailto:dans@t..."dans@t...
> WebSite: HYPERLINK
> "http://www.toledometalspinning.com/"http://www.toledometalspinning.
com
>
HYPERLINK "http://www.toledometalspinning.com/products_configurator.ht
m" \n
>
>
>
> Â
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002
>
>
>
> [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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
> 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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
What is the contents of the "CityState" field in the report? Is it
just "city state" as I thought, or "city state zip" or "city state
zip country"?

--- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> I don't think it can be done consistently, especially if the city
has
> two words and the state has two. For example, New York New York.
>
> If the state is abbreviated (New York NY) then possibly. In
Progress
> it would be..
>
> CityCommaState = substring(CityState,1,r-index(CityState," "))
+ ", "
> + substring(CityState,r-index(CityState," "))
>
> Crystal is not my forte, but doesn't InStrRev work like r-index?
>
> Lonnie
>
> --- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> > This is the Revised, corrected version. The numbers were a
little
> mixed up
> > in the last one....
> >
> > *Replace QUOTEADDR3 with a formula containing the text:
> >
> > numberVar SecondSpaceFromRight := InStrRev (trim
> ({quotehed.QUOTEADDR3}), "
> > ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
> >
> >
> > IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> > mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) +
Replace
> > ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> > else
> > {quotehed.QUOTEADDR3}
> >
> > *Replace QUOTEADDR4 with a formula containing the text:
> >
> > numberVar SecondSpaceFromRight := InStrRev (trim
> ({quotehed.QUOTEADDR4}), "
> > ", InStrRev (trim({quotehed.QUOTEADDR4}), " ") -1);
> >
> > IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> > mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) +
Replace
> > ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> > else
> > {quotehed.QUOTEADDR4}
> >
> >
> >
> > *Replace QUOTEADDR5 with a formula containing the text:
> >
> > numberVar SecondSpaceFromRight := InStrRev (trim
> ({quotehed.QUOTEADDR5}), "
> > ", InStrRev (trim({quotehed.QUOTEADDR5}), " ") -1);
> >
> > IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> > mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) +
Replace
> > ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> > else
> > {quotehed.QUOTEADDR5}
> >
> > -----Original Message-----
> > From: Thad Jacobs [mailto:tjacobs@k...]
> > Sent: Tuesday, March 19, 2002 3:44 PM
> > To: 'vantage@y...'
> > Subject: [Vantage] re: Comma between City and State
> >
> >
> > The problem is that the "city, state zip" field will float between
> > quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
> > depending on the population of address2 and address3.
> > So the solution is to verify that the next address field
> contains "USA", and
> > replace the space after the city with a ", ".
> >
> > To complicate things further, a city name may have more than one
> space, you
> > must look at the second space from the right.... So here's the
> formulas. I
> > think it may be the ugliest one I've written yet...
> >
> > *Replace QUOTEADDR3 with a formula containing the text:
> >
> > numberVar SecondSpaceFromRight := InStrRev (trim
> ({quotehed.QUOTEADDR3}), "
> > ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
> >
> >
> > IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> > mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) +
Replace
> > ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> > else
> > {quotehed.QUOTEADDR3}
> >
> > *Replace QUOTEADDR4 with a formula containing the text:
> >
> > numberVar SecondSpaceFromRight := InStrRev (trim
> ({quotehed.QUOTEADDR3}), "
> > ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
> >
> > IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> > mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) +
Replace
> > ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> > else
> > {quotehed.QUOTEADDR4}
> >
> >
> >
> > *Replace QUOTEADDR6 with a formula containing the text:
> >
> > numberVar SecondSpaceFromRight := InStrRev (trim
> ({quotehed.QUOTEADDR3}), "
> > ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
> >
> > IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> > mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) +
Replace
> > ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> > else
> > {quotehed.QUOTEADDR5}
> >
> >
> > Simple enough, eh?
> >
> > HTH,
> >
> > Thaddeus
> >
> > -----Original Message-----
> > From: dans@t... [mailto:dans@t...]
> > Sent: Tuesday, March 19, 2002 11:21 AM
> > To: Vantage Group (E-mail)
> > Subject: [Vantage] Comma between City and State
> >
> >
> > Novice Crystal Writer here.
> > Â
> > Can anyone tell me how to insert a comma between the city and
state
> in our
> > crystal quote form? It is one field not 2.
> > Â
> > I may be worse than a novice but boss is bugging me.
> > Â
> > Thanks,
> >
> > Daniel C. Spoerl
> > Estimator/MIS
> > Toledo Metal Spinning Co.
> > Phone: (419) 535-5931 ext. 203
> > Fax:Â Â Â (419) 535-0565Â
> > Personal E-fax: (707) 897-1708Â
> > Email:Â Â Â HYPERLINK
> > "mailto:dans@t..."dans@t...
> > WebSite: HYPERLINK
>
> "http://www.toledometalspinning.com/"http://www.toledometalspinning.
> com
> >
>
HYPERLINK "http://www.toledometalspinning.com/products_configurator.ht
> m" \n
> >
> >
> >
> > Â
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002
> >
> >
> >
> > [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
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
> >
> >
> >
> > 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
> >
> > Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
ThatÂ’s why I went to laying it out in Country Maintenance. Then I can
control how it looks.

Terry L. Williams I.S. Manager Chipsco, Inc. 9936 Liberty St. Ext.
Meadville, PA 16335 p.8143336331 x236 f.8143372548 tlw@...
<mailto:tlw@...> www.chipsco.com <http://www.chipsco.com/>

-----Original Message-----
From: lonniedrew [mailto:lonniedrew@...]
Sent: Tuesday, March 19, 2002 11:49 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Comma between City and State

I don't think it can be done consistently, especially if the city has
two words and the state has two. For example, New York New York.

If the state is abbreviated (New York NY) then possibly. In Progress
it would be..

CityCommaState = substring(CityState,1,r-index(CityState," ")) + ", "
+ substring(CityState,r-index(CityState," "))

Crystal is not my forte, but doesn't InStrRev work like r-index?

Lonnie

--- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> This is the Revised, corrected version. The numbers were a little
mixed up
> in the last one....
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR4}), "
> ", InStrRev (trim({quotehed.QUOTEADDR4}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR5 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR5}), "
> ", InStrRev (trim({quotehed.QUOTEADDR5}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
> -----Original Message-----
> From: Thad Jacobs [mailto:tjacobs@k...]
> Sent: Tuesday, March 19, 2002 3:44 PM
> To: 'vantage@y...'
> Subject: [Vantage] re: Comma between City and State
>
>
> The problem is that the "city, state zip" field will float between
> quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
> depending on the population of address2 and address3.
> So the solution is to verify that the next address field
contains "USA", and
> replace the space after the city with a ", ".
>
> To complicate things further, a city name may have more than one
space, you
> must look at the second space from the right.... So here's the
formulas. I
> think it may be the ugliest one I've written yet...
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR6 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
>
> Simple enough, eh?
>
> HTH,
>
> Thaddeus
>
> -----Original Message-----
> From: dans@t... [mailto:dans@t...]
> Sent: Tuesday, March 19, 2002 11:21 AM
> To: Vantage Group (E-mail)
> Subject: [Vantage] Comma between City and State
>
>
> Novice Crystal Writer here.
>
> Can anyone tell me how to insert a comma between the city and state
in our
> crystal quote form? It is one field not 2.
>
> I may be worse than a novice but boss is bugging me.
>
> Thanks,
>
> Daniel C. Spoerl
> Estimator/MIS
> Toledo Metal Spinning Co.
> Phone: (419) 535-5931 ext. 203
> Fax: (419) 535-0565
> Personal E-fax: (707) 897-1708
> Email: HYPERLINK
> "mailto:dans@t..."dans@t...
> WebSite: HYPERLINK
> " http://www.toledometalspinning.com/" http://www.toledometalspinning.
com
>
HYPERLINK " http://www.toledometalspinning.com/products_configurator.ht
m" \n
>
>
>
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system ( http://www.grisoft.com).
> Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002
>
>
>
> [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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
> 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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/




Yahoo! Groups Sponsor
ADVERTISEMENT

<http://rd.yahoo.com/M=215002.1818248.3328688.1261774/D=egroupweb/S=17050071
83:HM/A=847665/R=0/*http://ads.x10.com/?bHlhaG9vbW9uc3RlcjcuZGF0=1016599776%
3eM=215002.1818248.3328688.1261774/D=egroupweb/S=1705007183:HM/A=847665/R=1>


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

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> .


[Non-text portions of this message have been removed]
This formula looks from the right to the left, but unfortunately assumes
that the correct state abbreviation is used. The amount of spaces in the
city name will have no bearing on the replacement of the space with the
comma. However, a two word state name will present problems.

Thaddeus

--- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> This is the Revised, corrected version. The numbers were a little
mixed up
> in the last one....
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR4}), "
> ", InStrRev (trim({quotehed.QUOTEADDR4}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR5 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR5}), "
> ", InStrRev (trim({quotehed.QUOTEADDR5}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
> -----Original Message-----
> From: Thad Jacobs [mailto:tjacobs@k...]
> Sent: Tuesday, March 19, 2002 3:44 PM
> To: 'vantage@y...'
> Subject: [Vantage] re: Comma between City and State
>
>
> The problem is that the "city, state zip" field will float between
> quotehed.QUOTEADDR3, quotehed.QUOTEADDR4, quotehed.QUOTEADDR5
> depending on the population of address2 and address3.
> So the solution is to verify that the next address field
contains "USA", and
> replace the space after the city with a ", ".
>
> To complicate things further, a city name may have more than one
space, you
> must look at the second space from the right.... So here's the
formulas. I
> think it may be the ugliest one I've written yet...
>
> *Replace QUOTEADDR3 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
>
> IF instr({quotehed.QUOTEADDR4}, "USA") > 0 then
> mid({quotehed.QUOTEADDR3},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR3}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR3}
>
> *Replace QUOTEADDR4 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR5}, "USA") > 0 then
> mid({quotehed.QUOTEADDR4},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR4}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR4}
>
>
>
> *Replace QUOTEADDR6 with a formula containing the text:
>
> numberVar SecondSpaceFromRight := InStrRev (trim
({quotehed.QUOTEADDR3}), "
> ", InStrRev (trim({quotehed.QUOTEADDR3}), " ") -1);
>
> IF instr({quotehed.QUOTEADDR6}, "USA") > 0 then
> mid({quotehed.QUOTEADDR5},1 , SecondSpaceFromRight-1) + Replace
> ({quotehed.QUOTEADDR5}," " ,", " ,SecondSpaceFromRight, 1)
> else
> {quotehed.QUOTEADDR5}
>
>
> Simple enough, eh?
>
> HTH,
>
> Thaddeus
>
> -----Original Message-----
> From: dans@t... [mailto:dans@t...]
> Sent: Tuesday, March 19, 2002 11:21 AM
> To: Vantage Group (E-mail)
> Subject: [Vantage] Comma between City and State
>
>
> Novice Crystal Writer here.
> Â
> Can anyone tell me how to insert a comma between the city and state
in our
> crystal quote form? It is one field not 2.
> Â
> I may be worse than a novice but boss is bugging me.
> Â
> Thanks,
>
> Daniel C. Spoerl
> Estimator/MIS
> Toledo Metal Spinning Co.
> Phone: (419) 535-5931 ext. 203
> Fax:Â Â Â (419) 535-0565Â
> Personal E-fax: (707) 897-1708Â
> Email:Â Â Â HYPERLINK
> "mailto:dans@t..."dans@t...
> WebSite: HYPERLINK
> "http://www.toledometalspinning.com/"http://www.toledometalspinning.
com
>
HYPERLINK "http://www.toledometalspinning.com/products_configurator.ht
m" \n
>
>
>
> Â
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.336 / Virus Database: 188 - Release Date: 3/11/2002
>
>
>
> [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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
>
>
>
> 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
>
> Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/



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

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/