|
Can you give a sample screen shot? Like
Sold Invoice Stock
To Date Number
001 01/24/05 001
002
01/25/05 001
003
Then, how are your dates stored: True date fields?, numeric 20050124,
numeric 1050124, mmddyy, how?
Providing your dates are stored in any one of a number of formats that
facilitate sorting, and, the potential screen shot is what you want then
I'd suggest:
K ILNSOLDTO
K ILNINVDATE
K ILNSTK
This would require that you date check each record read for each customer
that it falls in the range. However, these lines would also work.
stmt='Select INLINVDATE, ILNSTK ' +
'FROM IMPILN00 ' +
'WHERE INLSOLDTO = ? AND ILNINVDATE BETWEEN ? AND ? ' +
'ORDER BY ILNINVDATE, ILNSTK'
c/exec sql
c+ prepare MySqlStmt from :stmt
C/end-exec
c/exec sql
c+ declare C1 cursor for MySqlStmt
c/end-exec
c/exec sql
c+ Open C1 using :DspfCust, :FromDate, :ToDate
c/end-exec
c/exec sql
c+ Fetch C1 into :DS.ilninvdate, :DS.ilnstk
c/end-exec
dou sqlstt...
// fill subfile
c/exec sql
c+ Fetch C1 into :DS.ilninvdate, :DS.ilnstk
c/end-exec
enddo
kinda sketchy, but you get the gist of it.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.