× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



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 thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.