AnsweredAssumed Answered

Reports based on relational tables

Question asked by TomM on Jan 7, 2009
Latest reply on Jan 8, 2009 by TomM


Reports based on relational tables


Hi there. I'm still quite new to this and I've got stuck on trying to construct a script to produce a report based on relational tables. I'll try to explain...


In simple terms I have 2 tables; AccountManager and Sale.


Each record in Sale is assigned to a single AccountManager.


An AccountManager record has a name and an office (either UK or USA).


I'm wanting to basically perform a find on all Sales that have come from, for example, the UK office. So I need to look at each Sale, look at the associated AccountManager and see if their office matches 'UK'.


How would you go about something like this? I understand that I need to perform a find with multiple Requests, one for each AccountManager who's office is 'UK', but I need to populate these Requests with data (AccountManager::name) from a different table (AccountManager) to the one I wish to perform the search in (Sale).


Might be a really simple solution, but I just cant get my head around it. Can you help?