Putting More Child Records On Report Detail?  
Author Message
krishnakrKC





PostPosted: Wed Sep 17 12:48:54 CDT 2003 Top

Exchange Servers >> Putting More Child Records On Report Detail?

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

Exchange Server21  
 
 
John





PostPosted: Wed Sep 17 12:48:54 CDT 2003 Top

Exchange Servers >> Putting More Child Records On Report Detail? 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



> 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


 
 
Leemi





PostPosted: Wed Sep 17 16:50:48 CDT 2003 Top

Exchange Servers >> Putting More Child Records On Report Detail? Hi Rick:

To create a multi child report in VFP Report Writer, take a look at:

http://fox.wikis.com/wc.dll?Wiki~MultiChildFoxProReports~VFP

and see Cathy Pountney's book "The Visual FoxPro Report Writer: Pushing it
to the Limit and Beyond." This book has a technique you can use to
simulate multiple detail bands in the VFP Report Writer.

This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retires June 30th, 2003
- VFP6 Mainstream Support retires Sept. 30th, 2003



> 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

 
 
Fred





PostPosted: Wed Sep 17 20:16:36 CDT 2003 Top

Exchange Servers >> Putting More Child Records On Report Detail? You could define a multi-column report. That would allow you to have as
many child "rows" as you can fit across the page.

Fred
Microsoft Visual FoxPro MVP



> 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


 
 
dejaemail





PostPosted: Thu Sep 18 08:55:52 CDT 2003 Top

Exchange Servers >> Putting More Child Records On Report Detail? Thanks Fred.

I tried your suggestion first and it is working nicely - I put the
header information into the page header since I always want that info
at the top of the page.

Now I have to figure out how to suppress some of this header
information on the second, third, fourth pages...if the header (group)
is the same as the previous page. For example I have address fields
that I do not want to print in the header of the 2nd, 3rd, 4th...
pages - just the name I want printed. I only want all the information
on the first page.

I probably will do some kind of record counter on the detail(child)
records - resetting it at the group break and 'IIF(child_count >
124,no print.., print...)' print the address fields in the page header
for all them fields I don't want to print on the next pages.

Thanks for all the great suggestions here. They really helped.

Rick



> You could define a multi-column report. That would allow you to have as
> many child "rows" as you can fit across the page.
>
> Fred
> Microsoft Visual FoxPro MVP
>