Re: Small query

Tom Nesler <[email protected]> Fri, 27 Sep 2002 07:07:29 -0700 (PDT)
Newsgroups gmane.comp.lang.delphi.quick-reports
Message-ID <[email protected]>
Hi Anantha!
--- ananth33 <[email protected]> wrote:
> HI there,
>   I have a master detail report.For one master record the detail 
> record report will come into 10 pages.ie the detailed record 
> information has to be printed in 10 different pages.
>   I need to print one mater record, the corresponding detailed info 
> into 1st page, 2nd page, 3rd page and so on... into 10 pages. The 
> next master record has to be printed on a fresh page and the 
> corresponding child info in the subsequent pages.
>   How can i design to achieve this? do i need to use composite
> report?
>   Any suggestions pls.

Is the information you are printing on the detail side different or the
same.  In other words are you printing 10 copies of the detail file or
10 different detail records linked to your master?

Also, does each of your pages have a different format?

If you are printing a master Page and 10 different Detail pages which
use the same format, you have it easy.  Just set the ForceNewPage
property on the Detail band (The Master page) and the SubDetail band
(The Detail pages) to True and each record will be printed on a
differrent page.  I would recommend not using a Page header band since
it only will work with the Detail band and won't print on any of the
subdetail band pages.


If you are printing 10 copies of the same page, you will need to use
the Childband feature of QuickReports.  Here is what I would do:

1.  Create your report with your detail band and Subdetail band the way
you want it. Set the Dataset properties of the QuickRep component to
your Master table and the SubDetail's Dataset properties to your Detail
table.  Set the HasChild property of the Subdetail band to true to
create a Child band linked to the Subdetail band. 

2.  Make a copy of the layout you want from the Subdetail band on the
Child band.  Use the same fields and labels.  Since the Subdetail band
has only printed once, the Child band(s) will contain the same data as
the Detail band.  Set the ForceNewPage property of the ChildBand to
True to jump to a new page after printing.

3. Repeat this 8 more times to create 9 Childbands.   I.E:
  1.  Set the HasChild Property of the last childband to True (very
important) to create a new childband linked to the previous one.
  2.  Copy the Fields and labels from the Subdetail band to the new
Child band that was created.
  3.  Set the ForceNewpage property of the new child band to True.

One note:  You cannot use the Composite report component to do what you
are looking for since the Composite report simply connects two or more
complete reports together.  What you are trying to do is (I think) to
print similar pages from one report.

Hope this helps,

=====
Tom Nesler

Live Long...Code Well... and Prosper! V

__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com