Progress Exports, next step (are we to adolesce nt steps yet?)

The code to remove commas was included mainly out of habit.
Populating selection lists and combo boxes requires this awareness,
as commas are used to separate list items.

I haven't always used the Export statement when storing to a text
file. Maybe I should from now on, or delimit with some odd character.

Regarding the "for each table1 of table2" question, I think my
preference goes back to that "feeling of control" I mentioned;
whether to select your index or let it be selected for you. I've
heard users say, "Can you speed this up?", too many times in the past.

And what about having to take the "long way around" just because an
index doesn't exist to match your needs. For example, a "company-
partnum-shipdate" index in shipdtl would be helpful.

Sounds impossible, but I remember hearing from someone at Vantage
support that we would be able to add our own to Vantage at some
point, without the dreaded "incorrect CRC value" error.

Lonnie


--- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> Lonnie, I was also under the impression for a while that CSV
wouldn't store
> our multi-line, comma and quote containing memo fields until I
tried it one
> day, and to my surprise, it worked, and I got to wondering why?
>
> I came to the conclusion that modern CSV import code, once it sees
a new
> field beginning with a " looks for a ", to denote the end of a
field. All
> (or shall I say most) characters until the end of the field are
just plain
> written to the file. Quotes within strings are generally stored in
CSV as
> "" so say you have a description that says:
>
> Thaddeus Jacobs, 6'1", Brown hair, brown eyes
>
> When its exported it will be converted to
>
> ...,"Thaddeus Jacobs, 6'1"", brn hair, brn eyes",....
>
> /*Test Hypothesis...*/
> def var teststring as char initial "Thaddeus Jacobs, 6'1"", brn
hair, brn
> eyes".
>
> message teststring.
>
> output to c:\vntgwrk\csvtest binary no-convert.
> export delimiter "," teststring.
>
> output close.
>
> input from c:\vntgwrk\csvtest.
>
> import delimiter "," teststring.
> input from terminal.
> message teststring.
> /*end test*/
>
> You can actually export a multiline memo field in CSV format as
well. You
> just have to make sure that all quotes within strings are converted
to
> double quotes (which the progress EXPORT statement already does).
>
> Long live CSV!!!
>
> ~Thaddeus
yahoo.com/info/terms/
In my experience, having commas in exported fields does not corrupt the file
(as far as IMPORT Statements, excel, access, or ado jet drivers are
concerned).

So depending on the interface you are using to read the file, it may not
always be necessary to strip commas out of descriptions, however, it's
probably good practice none the less, especially if you're writing your own
csv import code.

Thaddeus

-----Original Message-----
From: lonniedrew [mailto:lonniedrew@...]
Sent: Thursday, March 14, 2002 1:14 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Progress Exports, next step (are we to adolescent
steps yet?)


Oops, sorry. Instead of using substring to replace "," with " " in
orderdtl.linedesc, copy to variable LineDescVar, then use substring
on new variable. Export LineDescVar, not orderdtl.linedesc.

Lonnie
ldrew@...

--- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> Troy,
>
> This might work....
>
> def var ReleaseRemaining as integer init 0.
> output to c:\Releases.csv.
> for each orderdtl break by orderdtl.partnum:
> for each orderrel where orderrel.company = 0rderdtl.company
> and orderrel.ordernum = orderdtl.ordernum
> and orderrel.orderline = orderdtl.orderline
> break by orderrel.orderrelnum:
> ReleaseRemaining = ReleaseRemaining + OrderRel.OurRelQty -
> (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> end.
> if last-of(orderdtl.partnum) then do:
> /* get rid of commas in description */
> repeat while index(orderdtl.linedesc,",") > 0:
> substring(orderdtl.linedesc,index(orderdtl.linedesc,","),1)
> = " ".
> end.
> export delimiter "," orderdtl.partnum orderdtl.linedesc
> ReleaseRemaining.
> ReleaseRemaining = 0.
> end.
> end.
> output close.
>
>
>
> --- In vantage@y..., "Troy Funte" <tfunte@e...> wrote:
> > Jim,
> > I have this report done in Crystal which, as you say, is quite
> simple. But it is just step one of a two-step report that will use
> those numbers to input to another report that will list all the
> subcomponent materials for those assemblies. I know I could do it
in
> Crystal as all one report, along with a subreport; but if I could
> automate the first part with Progress and have it export nightly
(as
> we do with some other reports), then the second part would run nice
> and fast and could be run on demand.
> >
> > So, I'm looking for a Progress solution for the first part to
> make the whole thing more automated and quicker.
> >
> > Troy Funte
> > Liberty Electronics
> >
> > ----- Original Message -----
> > From: Jim Stetter
> > To: vantage@y...
> > Sent: Thursday, March 14, 2002 11:35 AM
> > Subject: RE: [Vantage] Progress Exports, next step (are we to
> adolescent steps yet?)
> >
> >
> > Troy, I don't have the answer using Progress but this would be
> very simple
> > to do with Crystal and ODBC. From Crystal you can export to
> Excel. I have
> > created numerous reports designed specifically for export to
> Excel and use
> > Crystal Decision WebComponent for client access. This setup has
> saved me
> > tons of aggravation and time.
> > Jim Stetter
> > -----Original Message-----
> > From: Troy Funte [mailto:tfunte@e...]
> > Sent: Thursday, March 14, 2002 10:50 AM
> > To: Vantage
> > Subject: [Vantage] Progress Exports, next step (are we to
> adolescent steps
> > yet?)
> >
> >
> > Many of you have been able to export .csv files directly
using
> small
> > Progress programs. I have done this with straight - record for
> record
> > queries by copying and pasting from the Export Utility in
> Vantage. Next
> > crossroads I have come to is this:
> >
> > Is there a way to Group, Summarize and Total fields in an
> export? Does
> > anyone have sample code to do that?
> >
> > Specifically, I want to take the OrderHed, OrderDtl, and
> OrderRel tables,
> > Group by PartNum, Find the formula OrderRel.OurRelQty -
> > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
This
> would be
> > the BalanceDue.
> > Then I want to Summarize the BalanceDue for each PartNumber.
> >
> > Output to the .csv file would only include: PartNum,
> Description,
> > BalanceDue.
> >
> > Any ideas?
> >
> > Troy
> >
> >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> > Yahoo! Groups Sponsor
> > ADVERTISEMENT
> >
> >
> >
> >
> > 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.
> >
> >
> >
> > [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/
An unexpected comma in a description WILL mess up the import of text
delimited with commas - I cannot think of an occasion when it would
not. This is not fixed length fields.

Lonnie

--- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> In my experience, having commas in exported fields does not corrupt
the file
> (as far as IMPORT Statements, excel, access, or ado jet drivers are
> concerned).
>
> So depending on the interface you are using to read the file, it
may not
> always be necessary to strip commas out of descriptions, however,
it's
> probably good practice none the less, especially if you're writing
your own
> csv import code.
>
> Thaddeus
>
> -----Original Message-----
> From: lonniedrew [mailto:lonniedrew@c...]
> Sent: Thursday, March 14, 2002 1:14 PM
> To: vantage@y...
> Subject: [Vantage] Re: Progress Exports, next step (are we to
adolescent
> steps yet?)
>
>
> Oops, sorry. Instead of using substring to replace "," with " " in
> orderdtl.linedesc, copy to variable LineDescVar, then use substring
> on new variable. Export LineDescVar, not orderdtl.linedesc.
>
> Lonnie
> ldrew@s...
>
> --- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> > Troy,
> >
> > This might work....
> >
> > def var ReleaseRemaining as integer init 0.
> > output to c:\Releases.csv.
> > for each orderdtl break by orderdtl.partnum:
> > for each orderrel where orderrel.company = 0rderdtl.company
> > and orderrel.ordernum = orderdtl.ordernum
> > and orderrel.orderline = orderdtl.orderline
> > break by orderrel.orderrelnum:
> > ReleaseRemaining = ReleaseRemaining + OrderRel.OurRelQty -
> > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> > end.
> > if last-of(orderdtl.partnum) then do:
> > /* get rid of commas in description */
> > repeat while index(orderdtl.linedesc,",") > 0:
> > substring(orderdtl.linedesc,index(orderdtl.linedesc,","),1)
> > = " ".
> > end.
> > export delimiter "," orderdtl.partnum orderdtl.linedesc
> > ReleaseRemaining.
> > ReleaseRemaining = 0.
> > end.
> > end.
> > output close.
> >
> >
> >
> > --- In vantage@y..., "Troy Funte" <tfunte@e...> wrote:
> > > Jim,
> > > I have this report done in Crystal which, as you say, is
quite
> > simple. But it is just step one of a two-step report that will
use
> > those numbers to input to another report that will list all the
> > subcomponent materials for those assemblies. I know I could do
it
> in
> > Crystal as all one report, along with a subreport; but if I could
> > automate the first part with Progress and have it export nightly
> (as
> > we do with some other reports), then the second part would run
nice
> > and fast and could be run on demand.
> > >
> > > So, I'm looking for a Progress solution for the first part
to
> > make the whole thing more automated and quicker.
> > >
> > > Troy Funte
> > > Liberty Electronics
> > >
> > > ----- Original Message -----
> > > From: Jim Stetter
> > > To: vantage@y...
> > > Sent: Thursday, March 14, 2002 11:35 AM
> > > Subject: RE: [Vantage] Progress Exports, next step (are we to
> > adolescent steps yet?)
> > >
> > >
> > > Troy, I don't have the answer using Progress but this would
be
> > very simple
> > > to do with Crystal and ODBC. From Crystal you can export to
> > Excel. I have
> > > created numerous reports designed specifically for export to
> > Excel and use
> > > Crystal Decision WebComponent for client access. This setup
has
> > saved me
> > > tons of aggravation and time.
> > > Jim Stetter
> > > -----Original Message-----
> > > From: Troy Funte [mailto:tfunte@e...]
> > > Sent: Thursday, March 14, 2002 10:50 AM
> > > To: Vantage
> > > Subject: [Vantage] Progress Exports, next step (are we to
> > adolescent steps
> > > yet?)
> > >
> > >
> > > Many of you have been able to export .csv files directly
> using
> > small
> > > Progress programs. I have done this with straight - record
for
> > record
> > > queries by copying and pasting from the Export Utility in
> > Vantage. Next
> > > crossroads I have come to is this:
> > >
> > > Is there a way to Group, Summarize and Total fields in an
> > export? Does
> > > anyone have sample code to do that?
> > >
> > > Specifically, I want to take the OrderHed, OrderDtl, and
> > OrderRel tables,
> > > Group by PartNum, Find the formula OrderRel.OurRelQty -
> > > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> This
> > would be
> > > the BalanceDue.
> > > Then I want to Summarize the BalanceDue for each PartNumber.
> > >
> > > Output to the .csv file would only include: PartNum,
> > Description,
> > > BalanceDue.
> > >
> > > Any ideas?
> > >
> > > Troy
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > > Yahoo! Groups Sponsor
> > > ADVERTISEMENT
> > >
> > >
> > >
> > >
> > > 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.
> > >
> > >
> > >
> > > [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/
Just to let you know, I dropped the part description from the export because it is irrelevent currently and was confusing me in trying to get the right groupings. I can pick up that field in the next step my report. You guys can carry on your discussion about comma's now.

Troy Funte
Liberty Electronics


----- Original Message -----
From: lonniedrew
To: vantage@yahoogroups.com
Sent: Friday, March 15, 2002 10:54 AM
Subject: [Vantage] Re: Progress Exports, next step (are we to adolesce nt steps yet?)


An unexpected comma in a description WILL mess up the import of text
delimited with commas - I cannot think of an occasion when it would
not. This is not fixed length fields.

Lonnie

--- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> In my experience, having commas in exported fields does not corrupt
the file
> (as far as IMPORT Statements, excel, access, or ado jet drivers are
> concerned).
>
> So depending on the interface you are using to read the file, it
may not
> always be necessary to strip commas out of descriptions, however,
it's
> probably good practice none the less, especially if you're writing
your own
> csv import code.
>
> Thaddeus
>
> -----Original Message-----
> From: lonniedrew [mailto:lonniedrew@c...]
> Sent: Thursday, March 14, 2002 1:14 PM
> To: vantage@y...
> Subject: [Vantage] Re: Progress Exports, next step (are we to
adolescent
> steps yet?)
>
>
> Oops, sorry. Instead of using substring to replace "," with " " in
> orderdtl.linedesc, copy to variable LineDescVar, then use substring
> on new variable. Export LineDescVar, not orderdtl.linedesc.
>
> Lonnie
> ldrew@s...
>
> --- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> > Troy,
> >
> > This might work....
> >
> > def var ReleaseRemaining as integer init 0.
> > output to c:\Releases.csv.
> > for each orderdtl break by orderdtl.partnum:
> > for each orderrel where orderrel.company = 0rderdtl.company
> > and orderrel.ordernum = orderdtl.ordernum
> > and orderrel.orderline = orderdtl.orderline
> > break by orderrel.orderrelnum:
> > ReleaseRemaining = ReleaseRemaining + OrderRel.OurRelQty -
> > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> > end.
> > if last-of(orderdtl.partnum) then do:
> > /* get rid of commas in description */
> > repeat while index(orderdtl.linedesc,",") > 0:
> > substring(orderdtl.linedesc,index(orderdtl.linedesc,","),1)
> > = " ".
> > end.
> > export delimiter "," orderdtl.partnum orderdtl.linedesc
> > ReleaseRemaining.
> > ReleaseRemaining = 0.
> > end.
> > end.
> > output close.
> >
> >
> >
> > --- In vantage@y..., "Troy Funte" <tfunte@e...> wrote:
> > > Jim,
> > > I have this report done in Crystal which, as you say, is
quite
> > simple. But it is just step one of a two-step report that will
use
> > those numbers to input to another report that will list all the
> > subcomponent materials for those assemblies. I know I could do
it
> in
> > Crystal as all one report, along with a subreport; but if I could
> > automate the first part with Progress and have it export nightly
> (as
> > we do with some other reports), then the second part would run
nice
> > and fast and could be run on demand.
> > >
> > > So, I'm looking for a Progress solution for the first part
to
> > make the whole thing more automated and quicker.
> > >
> > > Troy Funte
> > > Liberty Electronics
> > >
> > > ----- Original Message -----
> > > From: Jim Stetter
> > > To: vantage@y...
> > > Sent: Thursday, March 14, 2002 11:35 AM
> > > Subject: RE: [Vantage] Progress Exports, next step (are we to
> > adolescent steps yet?)
> > >
> > >
> > > Troy, I don't have the answer using Progress but this would
be
> > very simple
> > > to do with Crystal and ODBC. From Crystal you can export to
> > Excel. I have
> > > created numerous reports designed specifically for export to
> > Excel and use
> > > Crystal Decision WebComponent for client access. This setup
has
> > saved me
> > > tons of aggravation and time.
> > > Jim Stetter
> > > -----Original Message-----
> > > From: Troy Funte [mailto:tfunte@e...]
> > > Sent: Thursday, March 14, 2002 10:50 AM
> > > To: Vantage
> > > Subject: [Vantage] Progress Exports, next step (are we to
> > adolescent steps
> > > yet?)
> > >
> > >
> > > Many of you have been able to export .csv files directly
> using
> > small
> > > Progress programs. I have done this with straight - record
for
> > record
> > > queries by copying and pasting from the Export Utility in
> > Vantage. Next
> > > crossroads I have come to is this:
> > >
> > > Is there a way to Group, Summarize and Total fields in an
> > export? Does
> > > anyone have sample code to do that?
> > >
> > > Specifically, I want to take the OrderHed, OrderDtl, and
> > OrderRel tables,
> > > Group by PartNum, Find the formula OrderRel.OurRelQty -
> > > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> This
> > would be
> > > the BalanceDue.
> > > Then I want to Summarize the BalanceDue for each PartNumber.
> > >
> > > Output to the .csv file would only include: PartNum,
> > Description,
> > > BalanceDue.
> > >
> > > Any ideas?
> > >
> > > Troy
> > >
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> > >
> > > Yahoo! Groups Sponsor
> > > ADVERTISEMENT
> > >
> > >
> > >
> > >
> > > 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.
> > >
> > >
> > >
> > > [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/


Yahoo! Groups Sponsor
ADVERTISEMENT




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.



[Non-text portions of this message have been removed]
Well, I just proved myself wrong. I inserted a comma in the CSV
created last night. I forgot the Export statement bracketed
character data in quotes; it remained in the correct Excel column.

That's what I get for speaking in absolutes.

Lonnie

--- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> An unexpected comma in a description WILL mess up the import of
text
> delimited with commas - I cannot think of an occasion when it would
> not. This is not fixed length fields.
>
> Lonnie
>
> --- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> > In my experience, having commas in exported fields does not
corrupt
> the file
> > (as far as IMPORT Statements, excel, access, or ado jet drivers
are
> > concerned).
> >
> > So depending on the interface you are using to read the file, it
> may not
> > always be necessary to strip commas out of descriptions, however,
> it's
> > probably good practice none the less, especially if you're
writing
> your own
> > csv import code.
> >
> > Thaddeus
> >
> > -----Original Message-----
> > From: lonniedrew [mailto:lonniedrew@c...]
> > Sent: Thursday, March 14, 2002 1:14 PM
> > To: vantage@y...
> > Subject: [Vantage] Re: Progress Exports, next step (are we to
> adolescent
> > steps yet?)
> >
> >
> > Oops, sorry. Instead of using substring to replace "," with " "
in
> > orderdtl.linedesc, copy to variable LineDescVar, then use
substring
> > on new variable. Export LineDescVar, not orderdtl.linedesc.
> >
> > Lonnie
> > ldrew@s...
> >
> > --- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> > > Troy,
> > >
> > > This might work....
> > >
> > > def var ReleaseRemaining as integer init 0.
> > > output to c:\Releases.csv.
> > > for each orderdtl break by orderdtl.partnum:
> > > for each orderrel where orderrel.company = 0rderdtl.company
> > > and orderrel.ordernum = orderdtl.ordernum
> > > and orderrel.orderline = orderdtl.orderline
> > > break by orderrel.orderrelnum:
> > > ReleaseRemaining = ReleaseRemaining + OrderRel.OurRelQty -
> > > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> > > end.
> > > if last-of(orderdtl.partnum) then do:
> > > /* get rid of commas in description */
> > > repeat while index(orderdtl.linedesc,",") > 0:
> > > substring(orderdtl.linedesc,index
(orderdtl.linedesc,","),1)
> > > = " ".
> > > end.
> > > export delimiter "," orderdtl.partnum orderdtl.linedesc
> > > ReleaseRemaining.
> > > ReleaseRemaining = 0.
> > > end.
> > > end.
> > > output close.
> > >
> > >
> > >
> > > --- In vantage@y..., "Troy Funte" <tfunte@e...> wrote:
> > > > Jim,
> > > > I have this report done in Crystal which, as you say, is
> quite
> > > simple. But it is just step one of a two-step report that will
> use
> > > those numbers to input to another report that will list all the
> > > subcomponent materials for those assemblies. I know I could do
> it
> > in
> > > Crystal as all one report, along with a subreport; but if I
could
> > > automate the first part with Progress and have it export
nightly
> > (as
> > > we do with some other reports), then the second part would run
> nice
> > > and fast and could be run on demand.
> > > >
> > > > So, I'm looking for a Progress solution for the first part
> to
> > > make the whole thing more automated and quicker.
> > > >
> > > > Troy Funte
> > > > Liberty Electronics
> > > >
> > > > ----- Original Message -----
> > > > From: Jim Stetter
> > > > To: vantage@y...
> > > > Sent: Thursday, March 14, 2002 11:35 AM
> > > > Subject: RE: [Vantage] Progress Exports, next step (are we
to
> > > adolescent steps yet?)
> > > >
> > > >
> > > > Troy, I don't have the answer using Progress but this would
> be
> > > very simple
> > > > to do with Crystal and ODBC. From Crystal you can export
to
> > > Excel. I have
> > > > created numerous reports designed specifically for export
to
> > > Excel and use
> > > > Crystal Decision WebComponent for client access. This setup
> has
> > > saved me
> > > > tons of aggravation and time.
> > > > Jim Stetter
> > > > -----Original Message-----
> > > > From: Troy Funte [mailto:tfunte@e...]
> > > > Sent: Thursday, March 14, 2002 10:50 AM
> > > > To: Vantage
> > > > Subject: [Vantage] Progress Exports, next step (are we to
> > > adolescent steps
> > > > yet?)
> > > >
> > > >
> > > > Many of you have been able to export .csv files directly
> > using
> > > small
> > > > Progress programs. I have done this with straight - record
> for
> > > record
> > > > queries by copying and pasting from the Export Utility in
> > > Vantage. Next
> > > > crossroads I have come to is this:
> > > >
> > > > Is there a way to Group, Summarize and Total fields in an
> > > export? Does
> > > > anyone have sample code to do that?
> > > >
> > > > Specifically, I want to take the OrderHed, OrderDtl, and
> > > OrderRel tables,
> > > > Group by PartNum, Find the formula OrderRel.OurRelQty -
> > > > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> > This
> > > would be
> > > > the BalanceDue.
> > > > Then I want to Summarize the BalanceDue for each
PartNumber.
> > > >
> > > > Output to the .csv file would only include: PartNum,
> > > Description,
> > > > BalanceDue.
> > > >
> > > > Any ideas?
> > > >
> > > > Troy
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > > >
> > > > Yahoo! Groups Sponsor
> > > > ADVERTISEMENT
> > > >
> > > >
> > > >
> > > >
> > > > 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.
> > > >
> > > >
> > > >
> > > > [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/
I've found with some table matches the 'of' statement doesn't work properly,
because the indexes don't have the same name. However, I use it whenever
possible.

Thaddeus

-----Original Message-----
From: lonniedrew [mailto:lonniedrew@...]
Sent: Thursday, March 14, 2002 7:30 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Progress Exports, next step (are we to adolescent
steps yet?)


Jeff,

I prefer nesting each "for each table where", and explicitly defining
the joins, at least for the feeling of control. It's more like I've
always written code (Clipper, DBase, DBFast, and if I remember
correctly, like Pascal, Cobol and Pl/1 from way back in college). I
haven't used the "EACH table1 OF table2" syntax enough to have seen a
difference.

I try to follow an index as close as possible. If not satisfied with
the speed, I'll force index selection with...
"for each orderdtl USE-INDEX part break by orderdtl.partnum:"

I don't think an index rebuild would have any effect, unless records
are being skipped because of corruption(?).

Anyone else care to state their preference, or what method you would
use under what circumstance?

Lonnie

--- In vantage@y..., "Jeff Lewis" <jeff@h...> wrote:
> Lonnie, Thad, or any other 4GLer's,
>
> What do you think of this syntax?:
>
> >For Each OrderDtl where OrderDtl.Company = "your_company"
> > No-Lock,
> > Each OrderRel of OrderDtl where OrderRel.OpenRelease
> > No-lock
> > Break By OrderDtl.PartNum:
>
> The online help states that "When you use OF, all fields
participate in
> match criteria, if an index is multi-field. The relationship is
based on
> having a UNIQUE index in one table".
>
> We have licensed the source and I have seen them do it BOTH WAYS.
I did
> a file compare on this example and they are identical. Have you
ever
> seen bogus results using an OF? I myself have done it both ways but
> once I had to steer clear of the OF because I wanted the tables to
be
> more loosely coupled.
>
> Also, If a database needs an index rebuild will affected OF
statements
> quit working or work incorrectly? While the explicit syntax would
> continue to work but just be very slow? Are these code differences
> driven by "programming style"? If so I'd like to make my "style"
> better.
>
> Please advise.
>
> Thanks,
>
> Jeff



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/
Lonnie, I was also under the impression for a while that CSV wouldn't store
our multi-line, comma and quote containing memo fields until I tried it one
day, and to my surprise, it worked, and I got to wondering why?

I came to the conclusion that modern CSV import code, once it sees a new
field beginning with a " looks for a ", to denote the end of a field. All
(or shall I say most) characters until the end of the field are just plain
written to the file. Quotes within strings are generally stored in CSV as
"" so say you have a description that says:

Thaddeus Jacobs, 6'1", Brown hair, brown eyes

When its exported it will be converted to

...,"Thaddeus Jacobs, 6'1"", brn hair, brn eyes",....

/*Test Hypothesis...*/
def var teststring as char initial "Thaddeus Jacobs, 6'1"", brn hair, brn
eyes".

message teststring.

output to c:\vntgwrk\csvtest binary no-convert.
export delimiter "," teststring.

output close.

input from c:\vntgwrk\csvtest.

import delimiter "," teststring.
input from terminal.
message teststring.
/*end test*/

You can actually export a multiline memo field in CSV format as well. You
just have to make sure that all quotes within strings are converted to
double quotes (which the progress EXPORT statement already does).

Long live CSV!!!

~Thaddeus



-----Original Message-----
From: lonniedrew [mailto:lonniedrew@...]
Sent: Friday, March 15, 2002 8:03 AM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Progress Exports, next step (are we to adolesce
nt steps yet?)


Well, I just proved myself wrong. I inserted a comma in the CSV
created last night. I forgot the Export statement bracketed
character data in quotes; it remained in the correct Excel column.

That's what I get for speaking in absolutes.

Lonnie

--- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> An unexpected comma in a description WILL mess up the import of
text
> delimited with commas - I cannot think of an occasion when it would
> not. This is not fixed length fields.
>
> Lonnie
>
> --- In vantage@y..., Thad Jacobs <tjacobs@k...> wrote:
> > In my experience, having commas in exported fields does not
corrupt
> the file
> > (as far as IMPORT Statements, excel, access, or ado jet drivers
are
> > concerned).
> >
> > So depending on the interface you are using to read the file, it
> may not
> > always be necessary to strip commas out of descriptions, however,
> it's
> > probably good practice none the less, especially if you're
writing
> your own
> > csv import code.
> >
> > Thaddeus
> >
> > -----Original Message-----
> > From: lonniedrew [mailto:lonniedrew@c...]
> > Sent: Thursday, March 14, 2002 1:14 PM
> > To: vantage@y...
> > Subject: [Vantage] Re: Progress Exports, next step (are we to
> adolescent
> > steps yet?)
> >
> >
> > Oops, sorry. Instead of using substring to replace "," with " "
in
> > orderdtl.linedesc, copy to variable LineDescVar, then use
substring
> > on new variable. Export LineDescVar, not orderdtl.linedesc.
> >
> > Lonnie
> > ldrew@s...
> >
> > --- In vantage@y..., "lonniedrew" <lonniedrew@c...> wrote:
> > > Troy,
> > >
> > > This might work....
> > >
> > > def var ReleaseRemaining as integer init 0.
> > > output to c:\Releases.csv.
> > > for each orderdtl break by orderdtl.partnum:
> > > for each orderrel where orderrel.company = 0rderdtl.company
> > > and orderrel.ordernum = orderdtl.ordernum
> > > and orderrel.orderline = orderdtl.orderline
> > > break by orderrel.orderrelnum:
> > > ReleaseRemaining = ReleaseRemaining + OrderRel.OurRelQty -
> > > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> > > end.
> > > if last-of(orderdtl.partnum) then do:
> > > /* get rid of commas in description */
> > > repeat while index(orderdtl.linedesc,",") > 0:
> > > substring(orderdtl.linedesc,index
(orderdtl.linedesc,","),1)
> > > = " ".
> > > end.
> > > export delimiter "," orderdtl.partnum orderdtl.linedesc
> > > ReleaseRemaining.
> > > ReleaseRemaining = 0.
> > > end.
> > > end.
> > > output close.
> > >
> > >
> > >
> > > --- In vantage@y..., "Troy Funte" <tfunte@e...> wrote:
> > > > Jim,
> > > > I have this report done in Crystal which, as you say, is
> quite
> > > simple. But it is just step one of a two-step report that will
> use
> > > those numbers to input to another report that will list all the
> > > subcomponent materials for those assemblies. I know I could do
> it
> > in
> > > Crystal as all one report, along with a subreport; but if I
could
> > > automate the first part with Progress and have it export
nightly
> > (as
> > > we do with some other reports), then the second part would run
> nice
> > > and fast and could be run on demand.
> > > >
> > > > So, I'm looking for a Progress solution for the first part
> to
> > > make the whole thing more automated and quicker.
> > > >
> > > > Troy Funte
> > > > Liberty Electronics
> > > >
> > > > ----- Original Message -----
> > > > From: Jim Stetter
> > > > To: vantage@y...
> > > > Sent: Thursday, March 14, 2002 11:35 AM
> > > > Subject: RE: [Vantage] Progress Exports, next step (are we
to
> > > adolescent steps yet?)
> > > >
> > > >
> > > > Troy, I don't have the answer using Progress but this would
> be
> > > very simple
> > > > to do with Crystal and ODBC. From Crystal you can export
to
> > > Excel. I have
> > > > created numerous reports designed specifically for export
to
> > > Excel and use
> > > > Crystal Decision WebComponent for client access. This setup
> has
> > > saved me
> > > > tons of aggravation and time.
> > > > Jim Stetter
> > > > -----Original Message-----
> > > > From: Troy Funte [mailto:tfunte@e...]
> > > > Sent: Thursday, March 14, 2002 10:50 AM
> > > > To: Vantage
> > > > Subject: [Vantage] Progress Exports, next step (are we to
> > > adolescent steps
> > > > yet?)
> > > >
> > > >
> > > > Many of you have been able to export .csv files directly
> > using
> > > small
> > > > Progress programs. I have done this with straight - record
> for
> > > record
> > > > queries by copying and pasting from the Export Utility in
> > > Vantage. Next
> > > > crossroads I have come to is this:
> > > >
> > > > Is there a way to Group, Summarize and Total fields in an
> > > export? Does
> > > > anyone have sample code to do that?
> > > >
> > > > Specifically, I want to take the OrderHed, OrderDtl, and
> > > OrderRel tables,
> > > > Group by PartNum, Find the formula OrderRel.OurRelQty -
> > > > (OrderRel.OurJobShippedQty + OrderRel.OurStockShippedQty).
> > This
> > > would be
> > > > the BalanceDue.
> > > > Then I want to Summarize the BalanceDue for each
PartNumber.
> > > >
> > > > Output to the .csv file would only include: PartNum,
> > > Description,
> > > > BalanceDue.
> > > >
> > > > Any ideas?
> > > >
> > > > Troy
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > [Non-text portions of this message have been removed]
> > > >
> > > >
> > > > Yahoo! Groups Sponsor
> > > > ADVERTISEMENT
> > > >
> > > >
> > > >
> > > >
> > > > 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.
> > > >
> > > >
> > > >
> > > > [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/