Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Printing 1 Parent Detail / Many Detail Bands
Hi,

I'm struggling with a CW5.5 Legacy Report proc, trying to print the
complete parent file with many child details.

What's happening with two detail bands is it prints one parent, one
child, followed by another parent detail band and a child detail band.

All I want to have print is one detail band of the parent followed by
however many child detail bands as the 1:many relationship has in the
child file so it looks like this:

Parent detail
Child detail
Child detail
Child detail

Next report page

Parent detail
Child detail

Next report page

Parent detail
Child detail
Child detail
Child detail

Next report page, and so on.

Does anyone remember how this is done in Legacy?

Thanks!

James

Report this thread to moderator Post Follow-up to this message
Old Post
Arnett, James
03-27-04 04:01 AM


Re: Printing 1 Parent Detail / Many Detail Bands
Isn't this a case of a break on parent number with the parent information
in the group header and the detail information is from the child record?
The detail will repeat for each child.  I am assuming you have a
relationship set up in the dictionary.

If you want each parent on a new page then make sure you check the
pagebefore attribute or put in a footer with the page after set.

HTH,  Bob Roos

On 1 Mar 2004 02:19:41 -0800, Arnett, James <james@jamesarnett.com> wrote:

> Hi,
>
> I'm struggling with a CW5.5 Legacy Report proc, trying to print the
> complete parent file with many child details.
>
> What's happening with two detail bands is it prints one parent, one
> child, followed by another parent detail band and a child detail band.
>
> All I want to have print is one detail band of the parent followed by
> however many child detail bands as the 1:many relationship has in the
> child file so it looks like this:
>
> Parent detail
> Child detail
> Child detail
> Child detail
>
> Next report page
>
> Parent detail
> Child detail
>
> Next report page
>
> Parent detail
> Child detail
> Child detail
> Child detail
>
> Next report page, and so on.
>
> Does anyone remember how this is done in Legacy?
>
> Thanks!
>
> James



Report this thread to moderator Post Follow-up to this message
Old Post
spuds
03-27-04 04:01 AM


Re: Printing 1 Parent Detail / Many Detail Bands
I can't believe I figured this out but I got it after getting the ABC
to Legacy differences worked out using C&G Software's free Leg2ABC
utility, backwards : )

Report this thread to moderator Post Follow-up to this message
Old Post
Arnett, James
03-27-04 04:01 AM


Re: Printing 1 Parent Detail / Many Detail Bands
Thanks Bob,

This was a lot easier in Legacy but I was way over thinking it : )

All I had to do was drop the Parent record into the Detail Band and
create another band (Detail1), then add this into the "Before
Subsequent Record Retrival" embed point:

CLEAR(CHILD:Record)
SET(CHILD:KeyField,0)
LOOP
NEXT(Childfile)
IF ERRORCODE() THEN BREAK.

IF Child:Field=PARENT:Field
PRINT(RPT:Detail1)
ELSE
! pass over
END

END

Of course, there had to be a 1:Many file relationship, plus on the
Report properties, I had to filter Detail1 as "False" and it all
clicked just right.

Jumping from ABC to Legacy always throws me, especially looping
through files.

spuds <spudsnews@wybatap.com> wrote in message news:<opr3678ylk7tu0pk@news.wybatap.com>...[
color=darkred]
> Isn't this a case of a break on parent number with the parent information
> in the group header and the detail information is from the child record?
> The detail will repeat for each child.  I am assuming you have a
> relationship set up in the dictionary.
>
> If you want each parent on a new page then make sure you check the
> pagebefore attribute or put in a footer with the page after set.
>
> HTH,  Bob Roos[/color]

Report this thread to moderator Post Follow-up to this message
Old Post
Arnett, James
03-27-04 04:01 AM


Re: Printing 1 Parent Detail / Many Detail Bands
Hi James,

I don't know how to do it using the templates . . . but you can do it by han
d by having an individual print loop for each detail
section rather than having the details nested.

For example you could have;

loop [Parent]
print [Parent]
loop [Child1detail]
print [Child1detail]

Report this thread to moderator Post Follow-up to this message
Old Post
C.Joseph Drayton
03-27-04 04:01 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Clarion archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:47 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.