Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Don't generate a page

edited May 2006 in General
Hi,

Can I block a page generation?? I have a main report with a subreport set to
pbSection and after this subreport a blank page is generated and I don't
want this page.

--
Weverton Gomes de Morais
Programador
Goi?nia/GO

Comments

  • edited May 2006
    Hi Weverton,

    Where is your subreport located. By definition, a section subreport will
    take its own page to start and finish, the the rest of the report will
    continue once it is done printing. If for instance you have a section
    subreport inside a group footer or summary, the subreport will print
    followed by the rest of the band (giving you a blank page). To prevent
    this, you need to keep all section style subreports inside the detail band.
    You could also perhaps use child style subreports with pagebreak components
    to get the effect you are after.

    If you are aware how large your report is, it is possible to define a page
    list to be sent to the printer. Take a look at demo 124 (dm0124.pas) in the
    \RBuilder\Demos\1. Reports\... directory for an example of this.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Hi,

    Tanks by last answer.

    But my problem wasn't solved. I need make a report like demo 51; the
    difference is that the main report have a pipeline assigned and I have 3
    subreports set to pbSection. I need this because in my application the user
    can choose many enterprises and many months to print. So, I need to print
    all subreports to each enterprise/month. I created an enterprise and a month
    groups, then I put all subreports in detail band. When I'm printing,
    subreport1 is printed, then 3 blank pages are printed and after the
    subreport2 is printed. The same occurs to subreport3. What can I do to solve
    this problem??

    --
    Weverton Gomes de Morais
    Programador
    Goi?nia/GO
  • edited June 2006
    Hi Weverton,

    In Demo 51, you will notice that there is a title band, then a detail band
    with no other bands after that. If you have groups in the main report, then
    the blank pages are the group footers. Also, if you have a pipeline
    assigned to the main report, note that the detail band is going to print for
    each record in the dataset.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Hi,

    About the group footers, the height of all them is set to 0. About main
    report with pipeline assigned, there are only the 3 subreports in detail
    band. So, in the main report I have only the groups and the subreports.
    I need this: If the user select 2 enterprises and 2 months, I need print,
    for enterprise 1/month 1, subreport 1, subreport 2 and subreport 3; for
    enterprise 1/month 2, I need print subreport1, subreport2 and subreport3;
    for enterprise 2/month1, I need print all subreports too; for enterprise
    2/month2, I need print all subreports too. How can I make this without print
    blank pages between subreports??

    Thanks,

    Weverton

    --
    Weverton Gomes de Morais
    Programador
    Goi?nia/GO
  • edited June 2006
    > About the group footers, the height of all them is set to 0.

    Unfortunately this does not matter, a new page will still be generated.

    If you need to use groups in the main report, you willnot be able to use
    Section subreports to get your desired output. I would suggest changing all
    three subreports to Child style and using the groups NewPage property to
    start new pages and perhaps using the TppPageBreak component to separate
    each subreport.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    But if I change the subreports to Child, headerbands and footerband aren't
    printed and I need these.

    --
    Weverton Gomes de Morais
    Programador
    Goi?nia/GO
  • edited June 2006
    Hi Weverton,

    Please provide me with an exact description of how you would like your
    report layout to look. This way I can hopefully offer a solution that meet
    all your requirements. A diagram could also be useful.

    Instead of the header and footer bands, you could try either using the main
    report's header and footer bands, or group header and footer bands inside
    the subreports.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2006
    Hi,

    In attachment, there is a simple model of report sequence. In this example,
    user select 2 enterprises and 1 month to print.

    Thanks,

    --
    Weverton Gomes de Morais
    Programador
    Goi?nia/GO
  • edited June 2006
    Hi Weverton,

    Do you have your datasets in a Master-Detail relationship? If not, I
    believe you can accomplish what you want by using Master-Detail datasets and
    no groups in the main report. Take a look at the following example that
    does just that.

    http://www.digital-metaphors.com/tips/MasterdetailSection.zip

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.