CompuServe Messages

#Report with Index

    27-Apr-93 19:44:22
Sb: #Report with Index
Fm: Bill Roberts 76056,1613
To: SB4 gurus
I am having a problem doing a report as a part of a SBASE4 program. I have two files, Company and transactions. Company has an indexed field, ID, which is the sequence number of the Company in the file, and therefore unique. The second file records transactions made for the company. Each transanction is indexed by related company_id. Also, each transaction has a date. Since I normally want to access the transactions within a company by date, I have a virtual field index str$( Company_id, "0000" ) + str$( days( transdate ), "0000000" ). So the CompDate field for a transaction looks something like 00150072849. And they are in order by company, by date. Now the problem. I want to wright a report that groups by company, then by date for either all the transactions, all transactions for a specific company, specific company in the last 12 months, or specific company this year. How can I make the REPORT use the CompDate index? I don't especally want to write my own code and bypass reports. Thanx for any suggestions. Bill Roberts — Autopilot from Ellettsville, Indiana