printing a record selected from a portal
Posted on 2004-08-25
i have 4 relational databases:
client (main database): fields: client #, client name
matter: fields: client #, matter #, name, description
file: fields: client #, matter #, file #, description
subfile: fields: client #, matter #, file #, subfile #, description
i am trying to print labels by pulling fields from all these databases.
in my client database i have a layout that asks for a client # in find mode. once the client number is accepted i have a portal that displays the subfile::matter#, subfile::file# and subfile::subfile# fields
i also have a print button that runs the following script:
Go to Related Record [Show only related records; From table: "Subfile"; External; Using layout; <Current Layout>]
Perform Script ["print label" from file "subfile"]
Select Window [Name: "subfile"]
when i click on the print button on a portal row, the script runs and i am switched to the subfile database and label layout.
the fields on the label layout are:
subfile::client#, subfile::matter#, subfile::file#, subfile::subfile#, subfile:: description
my problem is that if i go to view, browse, list i notice that the client information and the subfile information is correct.
however, the matter and the file information is pulling only the information from the first record of the client in the matter database and the first record of of the client in the file database and not the corresponding information based on the matter number displayed or the file number displayed