Singlequanta Posted February 10, 2005 Share Posted February 10, 2005 Greetings all. I'm having a problem understanding how to do a slightly more complex report out of several related tables. The project itself is a lot more complex than the test file I'm attaching, but understanding how to do the test example correctly will give me the necessary "know how" to do this right. In essence, my primary table is a "company" table. Associated to this is a "Lot" table that defines how many lots are in each company (related via a company id index) Tertiary to this is the "contacts" table which provides three seperate contacts per lot per company (related via a contact ID index) So... 1. In my attached example, there are five companies. 2. Each company has a random number of lots (in the real life project) 3. Each lot has three contacts (These contacts are actually imported through an odbc connection to an SQL database so this table needs to remain independant) Eventually this data needs to be exported to a CSV file. In the attached sample, there is a script which exports the data. If the data is just "exported" raw then the output file works. But if a find and/or sort are done on the company, then the export does not work at all. Any ideas on what I'm doing wrong here? Eventually what I need to arrive at, is the ability to either find and/or sort the company data and export the related lots/contacts based on that sorted subset. Any help is greatly appreciated and will be returned with vast quantities of Gold and Silver.... OK, I'll send you an E-card.. help.zip Link to comment Share on other sites More sharing options...
This topic is 6623 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now