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

TppVariable and TwoPass Report

edited June 2002 in General
I seem to be getting incorrect data in my variable field. Say I am setting
my variable = variable + member.current_balance in the on_calc event of the
variable. If it is a two pass report, will the value be twice as much as
the current balance if the calctype = veTraversal and resettype =
veGroupEnd?

Thanks,
Stacey

Comments

  • edited June 2002
    No, the value shouldn't be twice as much because the variable is being
    reset. What is the actual calculation you are performing and how is the
    result deviating from what it should be?

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    I've tracked it down to the first record on each new page. I have my report
    broken down into groups, for instance, I have all my club members joined to
    their sales, then ordered by their club_name, account_number and then
    date_of sale. Then, I have two groups, club_name[0] and account_number[1].
    In the club_name header, I just put the club_name, in the account_number
    footer, I have variable fields that I use to store the total sales, charges
    and payments, etc. So, oncalc of the first variable in the account_number
    footer line, I have all my logic which puts the amounts into global
    variables, these variables are first cleared in the reset event of the
    variable field. The first variable field's CalcType is veTraversal and
    ResetType is GroupEnd based on account_number[1] group.

    Then, on the footerbandaftergenerate, I fill all the variable fields from my
    global variables and all is well. Except, I am having a problem w/ the
    first record on each new field...it seems to go through each set of detail
    records twice, so I am getting double values for those records only.

    Any suggestions?

    Thanks,
    Stacey

    "Alexander Kramnik (Digital Metaphors)" wrote
This discussion has been closed.