Re: Putting More Child Records On Report Detail? by John
John
Wed Sep 17 12:48:54 CDT 2003
Hey Chester,
You write a function that builds a string and returns it. Then set that
string as the report field's expression.
Say you've got:
CREATE CURSOR curContact ( OrgID I, ContactID C (5), ContactName C (20) )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "JCS",
"Joe Schimko" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "TCS",
"Tom Schimko" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "ECS",
"Erin Schimko" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "TCS",
"Tracy Schimko" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "RCS",
"Russ Schimko" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "BCS",
"Betty Schimko" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "JJJ",
"Jimmy Jones" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "NJJ",
"Nancy Jones" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "AJJ",
"Adam Jones" )
INSERT INTO curContact (OrgID, ContactID, ContactName ) VALUES ( 1, "VJJ",
"Veronica Jones" )
FUNCTION ListContacts
LPARAMETERS nContacts
ReturnVal = ALLTRIM( ContactName ) + " (" + ALLTRIM( ContactID ) + ")"
FOR ContactCntr = 2 TO nContacts
SKIP
IF EOF()
EXIT
ENDIF
ReturnVal = ReturnVal + ", " + ALLTRIM( ContactName ) + " (" +
ALLTRIM( ContactID ) + ")"
ENDFOR
RETURN ReturnVal
HTH,
John
"Chester Deja" <dejaemail@yahoo.com> wrote in message
news:7de036b7.0309170911.369c0fa7@posting.google.com...
> I have a report that has a parent record (grouped) that prints in the
> group header and the child records print in the detail. Easy enough.
>
> There is only two fields per child record. I would like to print 4 or
> 5 child records per detail line to get rid of all the wasted space and
> to save paper. Is there and easy way to do this in foxpro. I know I
> could do it in a complicated way with arrays and such but I am looking
> for an easy way if there is one. There can be hundreds of child
> records sometimes.
>
> I wish there was a detail line setting that says 'wrap'/'unwrap' the
> detail line printing.
>
> Thanks, Rick