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

DBCalc question

edited January 2002 in General
Hello,

I have two DBCalc components in a group header with LookAhead property set
to true. These components are calculating the correct amounts. However, I
would like to use the values of these components to set a variable. Where
can I get the values to use in a variable calculation. The values are
always 0.

Thanks in advance
Dan

Comments

  • edited January 2002
    The values are incremented as the report generates detail bands. It doesn't
    traverse data to perform the calculation when the band prints. The report
    generates normally, but then the engine updates the look ahead dbCalc's draw
    command on a page, as the following detail bands are generated.

    You could create a calculated field on the dataset to get a summary value by
    group. The other way to get a look ahead value, is to calculate them
    programatically in the first pass of a two pass report. Use a TppVariable
    and code its OnCalc event handler. Then save its value into a list, one
    value for each group. Then in the second pass, you can get the value and use
    it as the group performs calculations in the second pass. There are two
    boolean properties you can read to use in your event handler code:
    Report.FirstPass and Report.SecondPass.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.