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

Very strange. If I put a qryMyTable.Next into DetailBand AfterPrint, the values shows up in Preview,

edited June 2013 in General
Hello again.

My previous question was that table1 values printed normaly, but table2
printed only the first records value repeatedly until the end of the
sheet.
I thought I might have solved that with qryMyTable2.Next in the
Detailbands AfterPrint event.
Then the Preview shows up perfect with the values as they should be.
Except the fact that only the values from qryMyTable1 is actually
printed on the paper.
The values from qryMyTable2 that is perfectly shown in the preview does
NOT print on the paper.
Mildly said, very frustrating.

Any advice here?
Thanks in advance.

:)
Kai Inge

Comments

  • edited June 2013
    Hi Kai,

    For future reference, please post continued messages to the original
    thread instead of creating a new one.

    Rather than having two datasets, I recommend creating a single query
    with the two tables joined. This will give you both sets of data you
    need in a single dataset and will remove the need for any manual traversal.

    ReportBuilder is designed to traverse a single dataset per
    Report/Subreport. Simply calling DataSet.Next inside the AfterPrint
    event can give incorrect results as this event doesn't always fire once
    per record. Also paging backward through a report will not function.


    Best Regards,

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