Thanks for the post and welcome.
While there may be a more direct way of doing it, the way I use is this:
Link a Table Occurrence by the normal identifier you use AND another field (Newfield). In your script, after you find the foundset, replace the contents of Newfield with something (the word "banana" for example) .
In your second file, have a global field (newfieldtoo) that is set to "banana".
Now you have a dynamic "linked set" based upon your "found set". From your second file, you can do a Sum() calculation and get your total of all the "linked set".
If you go this route, remember to clear the word "banana" out of the file1 Newfield or your relationship will go ape:P.
Thanks for the reply. I am trying to make it work, but it still is looking at the entire file, rather than the found records, so I must be doing something wrong. Do I have to change my sort or anything like that?
i had to do this last week, i solved it by creating a "Search date from" and "a search date to" global date field in the database that you are running the report from. Then in each of your databases that you are searching in, create a field which uses a dual IF command to insert a "1" if greater than search date from and less than search date to, set the else if argument to "" so that it remains empty. Then use the rest of your script to count or lookup what information you need.
hope that helps.
Andyg4137 is forming the relationship the same way (but a little different) and both would work. Andyg used the number 1 instead of the word banana, but the concept is still the same. Instead of trying to total across multiple found sets, you are tagging the records and then totalling the tagged records.
Assuming that they are tagged with "banana",
and that you've created a global field with "banana" in it in your main table.
The relationship with the other Dbase Table Occurences needs to be your normal linkage and the "tagging fields"
(UniqueID to UniqueID) AND (MainTable::Bananafield to OtherTable::bananafield) In this way it connects only the related records, and even of those only the tagged records.
You'll need to have your total be
= Sum(OtherDbase1::Field) + Sum(OtherDbase2::Field)
In my use, I have the other Dbase records portaled in. I'm not sure if this is required or not...I've never tried this without portaling it in. My gut says that the portal in is needed (but you can make it tiny and non-printing if you don't want to see it).
How are we doing?