Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ken Blum
  Where is Ken Blum?
 Chicago
 Illinois - United States
 Ken Blum
 Tags
Subject: Multiple Detail Band Report
Thread ID: 268933 Message ID: 268933 # Views: 48 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Thursday, July 15, 2010 2:33:24 PM         
   


NEVER MIND - I'm a moron. Had the detail2 text boxes in the Detail 2 Header band! DOH!

I have a report that needs to display 2 cursors of data in separate detail bands. The problem is that all of the rows print in Detail Band 1, but only 1 row prints in Detail Band 2.

The first cursor is named Rep_Data and the second is Manual_Data. I create a dummy "Class_Join" cursor and then set the relations as follows...

SELECT 1 AS DrvJoin,Rep_Data.*,;		
	FROM Rep_Data INTO CURSOR Rep_Data READWRITE ORDER BY Name

SELECT 2 AS DrvJoin2,Manual_Data.*;
	FROM Manual_Data INTO CURSOR Manual_Data READWRITE ORDER BY Name

CREATE CURSOR Class_Driver (DrvJoin int,DrvJoin2 int)
INSERT INTO Class_Driver (DrvJoin,DrvJoin2) VALUES (1,2)

SELECT Class_Driver
INDEX ON DrvJoin TAG DrvJoin
INDEX ON DrvJoin2 TAG DrvJoin2 ADDITIVE
SELECT Rep_Data
INDEX ON DrvJoin TAG DrvJoin
SELECT Manual_Data
INDEX ON DrvJoin2 TAG DrvJoin2
SELECT Class_Driver
SET RELATION TO DrvJoin INTO Rep_Data
SET RELATION TO DrvJoin2 INTO Manual_Data ADDITIVE

SELECT Class_Driver


Detail Band 1 Target Alias is set to "Rep_Data" and Detail Band 2 is set to "Manual_Data".

Note that the first time I set this up I just had one column in Class_Driver and joined both cursors to that (DrvJoin) but since that did not work I tried 2 separate columns and indexes.

Any idea why it only prints one row in Detail Band 2? It seems to print blank white space for the other rows, but that's kind of hard to tell.



KTB

ENTIRE THREAD

Multiple Detail Band Report Posted by Ken Blum @ 7/15/2010 2:33:24 PM