Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with VFP 9 Multiple Detail Banks

Status
Not open for further replies.

FrankMoore

Programmer
Nov 17, 2006
4
US
Guys,

I am tryihng to use the new VFP 9 multiple Detail bands, and I must not be understanding something.

I have a priimary table TRUSTOR with a primary field Trustor_id. It is the driving cursor in my report. Connected to it I have two tables, LOANS and TRAN_HIST, both with secondary Trustor_id fields. I have them relationalized in the reports Data Environment.

Now, if I set up a detail band with Tran_hist or Loan, and run the report, each of the trustors come up with all of the loans or Tran_hist records. But, if I setup with two detail bands so, supposedly, all of the trustor trustor_id records for loans and all of the trustor_id records for tr_hist should come up as a set, I get only ONE records per table for trustor. Anyone guess what gives?
 
I am using the Data Environment and connections within it. It should work.

An odd thing is that I found in the Loan file if there is only 1 record to print only one Tr-Hist record prints, but if you have 5 Loan records to print 5 Tr_hist records print. Many more records in Tr_hist.

Frank
 
I vaguely remember seeing the similar problem discussed on the other site, I'll do a search. In the meantime do you have SP1 for VFP9 installed? Did you review the articles I point you to?
 
First: I would set the relationship in the form (set relation ...) that starts the report and not have the tables "relationalized" in the form DE. Leave them in the form DE without the persistant relationship. (maybe just my way of coding)

Next: for the 2 detail bands, in each band reference the target table. i.e. right click the band -> properties->Band Pane-Target Alias expression = "Child Table Name", Do not forget the quotes. This will make it 1 to Many

Have not done this for a long time, maybe the tables with a persistant relationship in the Form DE will work as well. Try it both ways...
 
Read "..tables "relationalized" in the form DE.." as
"...tables "relationalized" in the Report DE...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top