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

Enclosing a field in double quotes will general protect it from
corrupting the import. Most import functions recognize this a signal
that a character string follows, and ignore any embedded special
characters until the second quote is encountered.

Thad Jacobs 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@...]
> 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/
>
>
> 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/

--
/* ================================================================*/

Specialists in Progress Databases and Software since 1986

William E. Colls william@...
PROComputer Systems Tel 613 591 0079
67 Willow Glen Dr. Fax 613 591 3924
Kanata Ontario Canada www.procomsys.com
K2M 1T1
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]
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@...]
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]
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@yahoogroups.com
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@...]
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]
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]
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]
Lonnie,
I was hoping I'd hear from you or Thad! I'll certainly try to unravel this masterpiece and see if it will do the trick.

Troy Funte
Liberty Electronics

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


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]


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]
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
Lonnie,
Your code gets really close the first time. What I can't figure out is how to get the sum-total of balance remaining for each part number. I've been trying to adjust the break statement to group by part regardless of ordernum, but can't seem to get it. See if this makes sense... [Balance Due is a calculation, by the way - "reqqty - (stockshipqty + jobshipqty)"]

Let's say I have:
Order Line Rel PartNum Balance Due
1 1 1 aaa 5
1 2 1 bbb 8
2 2 1 aaa 6
2 2 2 aaa 4

I want the output to be:
PartNum Balance Due
aaa 15
bbb 8



Your output is:
PartNum Balance Due
aaa 5
aaa 10
bbb 8

What am I missing?

Troy Funte
Liberty Electronics

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


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]


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]
Troy,

I tested it and the output seems OK (except for changing ourrelqty to
ourreqqty). One thing that can cause your scenario is the "for each
orderdtl" loop breaking by something other than partnum. Also make
sure the "end" statements are in the same place.

The output could also look strange if your parts are basically
numbers and partnum is a character field.

I can't think of anything else right now. I'll take a look at it if
you would like.

Lonnie

--- In vantage@y..., "Troy Funte" <tfunte@e...> wrote:
> Lonnie,
> Your code gets really close the first time. What I can't figure
out is how to get the sum-total of balance remaining for each part
number. I've been trying to adjust the break statement to group by
part regardless of ordernum, but can't seem to get it. See if this
makes sense... [Balance Due is a calculation, by the way - "reqqty -
(stockshipqty + jobshipqty)"]
>
> Let's say I have:
> Order Line Rel PartNum Balance Due
> 1 1 1 aaa 5
> 1 2 1 bbb 8
> 2 2 1 aaa 6
> 2 2 2 aaa 4
>
> I want the output to be:
> PartNum Balance Due
> aaa 15
> bbb 8
>
>
>
> Your output is:
> PartNum Balance Due
> aaa 5
> aaa 10
> bbb 8
>
> What am I missing?
>
> Troy Funte
> Liberty Electronics
>
> ----- Original Message -----
> From: lonniedrew
> To: vantage@y...
> Sent: Thursday, March 14, 2002 4:09 PM
> Subject: [Vantage] Re: Progress Exports, next step (are we to
adolescent steps yet?)
>
>
> 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]
>
>
> 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]
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