Home Subreports

Problem with totalling.

edited November 2005 in Subreports
Hello,
I have a simple report that has been designed with linked queries (RB
9.03)

MasterQuery -> DetailQuery

MainReport (MASTERQUERY)
Header
Detail
Subreport1 (DETAILQUERY)
Summary
object TotalDetailRecords


I have placed a variable "TotalDetailRecords" in the summary section of the
main report.

I have written an oncalc handler Value := Value + 1;

I have used the Timing Dialog to set

Calculate On: DataPipelineTraversal
Data Pipeline: DETAILQUERY
ResetOn: ReportStart

Problem is the final total appears to be inaccurate by the number of
pages+1.

if the sum of records printed is 3776 and the report is 62 pages in length
then the final total is 3839 (+63).

My guess is that the OnCalc is being executed twice on page break.

How can i get an accurate total in the main report when using linked
queries?

Comments

  • edited November 2005

    Try adding a TppVariable to the subreport, lets call it subVar and then use
    the subVar.OnCalc to increment the Variable in the main report.






    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.