Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageIsn'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
Post Follow-up to this messageI 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 : )
Post Follow-up to this messageThanks 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]
Post Follow-up to this messageHi 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]
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.