Home > Archive > Clarion > March 2004 > Printing 1 Parent Detail / Many Detail Bands
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Printing 1 Parent Detail / Many Detail Bands
|
|
| Arnett, James 2004-03-26, 11:01 pm |
| 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
| |
| spuds 2004-03-26, 11:01 pm |
| 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
| |
| Arnett, James 2004-03-26, 11:01 pm |
| 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 : )
| |
| Arnett, James 2004-03-26, 11:01 pm |
| 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>...
> 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
| |
| C.Joseph Drayton 2004-03-26, 11:01 pm |
| Hi James,
I don't know how to do it using the templates . . . but you can do it by hand 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]
|
|
|
|
|