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

Print twice in one page

edited December 2010 in General
Hi,

I have an A4 Paper and I want to print a delivery note twice. Once in the
upper half and the other one in the bottom half.

I've created a report with a Detail Band , BandsPerRecord = 2,
ColumnTraversal cfTopToBottom, PrintHeight phStatic. Within the detail band
I put a SubReport, printBehaviour pbFixed. When the subreport has less lines
that the Subreport size it prints OK (One Delivery Note in the Upper half
and the same one in the Bottom half).

The problem comes when the subreport doesn't fit in one page and it only
shows the lines that fit. If I put TraverseAllData = true it prints the
first lines of the delivery note in the upper half. The second half is not
filled. Then the last part of the delivery note goes to in the upper half of
the second page. Then the first part of the delivery note (copy 2) goes in
the bottom half of the second page. The last part of the Delivery note (copy
2) goes in the upper half of the third page.

Is there a way to print the same report in the upper half and in the bottom?

Thanks,

José María Sanmartín

Comments

  • edited December 2010

    Try creating a main report with a tall detail band that takes up the page.
    Take the subreport and copy/paste so that you have two subreports, one above
    the other. Set each to pbFixed and TraverseAllData. In my testing here that
    produces two subreports that can each overflow.



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited December 2010
    Thanks Nard.

    We are very close to reach a solution but I can't manage to solve it.

    You can reproduce the problem if you put another subreport in each
    subreport. I mean:

    MainReport
    1.- Subreport
    2.- Subreport
    It prints ok


    Main Report
    1.- Subreport
    1.1.- Subreport
    2.- Subreport
    2.1.- Subreport

    Prints the 1.- subreport in the upper part of the page 1 and 2. OK
    But prints the 2.- subreport in the lower part of the page 2 and 3. Not OK

    I don't know if I explain myself, but I can send an output in PDF in order
    you can see. Give me an email address to send it.

    Thanks,

    José María Sanmartín
  • edited January 2011
    Hi Nard,

    Any solution to this problem?

    Thanks,

    José María Sanmartín

  • edited January 2011

    I have recreated the issue in an example project and have researched it but
    not yet found a solution. I will post a follow up here when I know more.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2011
    Thanks

  • edited January 2011
    I revisited this again. I made an example with the Delphi DBDemos data -
    customer/order/item.

    main - customer
    pbFixed subreport - order
    pbChild subreport - item

    pbFixed subreport - order (same layout as pbFixed above)
    pbChild subreport - item (same layout as pbChild above)


    In my test here, the report generates correctly. If you send an email to
    support@ I can send the example project and the PDF output.




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2011
    For future reference. Nard also suggested putting KeepTogether to False and
    with that the problem was solved

    Thanks for your excellent support,

    Jose Maria Sanmartin
This discussion has been closed.