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

Master/Detail problem in calc !!!!

edited September 2003 in General
Hi,

I am trying to do a Master/Detail report in the ReportBuilder (version 7.01
for
Delphi 6) using a Report and SubReport and I am heaving some problems that I
can't sove.

In the Report I have a summary band wich I am totalizing the values of the
SubReport in a calc variable in ON-CALC event, like this:

Value := Value + Table_Docs[VALUE_DOC];

- In Actions Movement I have:
To calculate in: Pass of the Conducting
Conductor of Data: Detail

When I have a page jump, the variable do a wrong calc, addition the value
two times.

Page 01 Page 02
__________ __________
|--Master-- | |U$ 50 | >> This detail value is added two times in the
variable
|xxxxxxx | |--Master--| that totalize the detail values in Master
Report in
|--Detail-- | |xxxxxxx | Summary Band
|U$ 10 | |--Detail--|
|U$ 20 | |U$ 60 |
|U$ 30 | |--Summary-|
|U$ 40 | |Variable | >> The value is U$ 260. Here the value U$ 50 is
added
|__________| |__________| two times in the variable.


When I don't have a page jump the addition is normal

Page 01 Page 02
__________ __________
|--Master--| |--Master--|
|xxxxxxx | |xxxxxxx |
|--Detail--| |--Detail--|
|U$ 10 | |U$ 60 |
|U$ 20 | |--Summary-|
|U$ 30 | |Variable | >> The Value is U$ 210. Here the value is right.
|U$ 40 | | |
|U$ 50 | | |
|__________| |__________|

How do I solve this problem?

Thanks,
Augusto

Comments

  • edited September 2003
    Hi Augusto,

    I am having a little trouble understanding the issue. Please if possible
    send a small example demonstrating this behavior in .zip format to
    support@digital-metaphors.com and I'll take a look at it for you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited October 2003
    Hi Nico,

    example demonstrating this behavior

    1 page end total = 363.668 - 400 = ????
    2 page top total = 362.868,00 (error)
    correct 363.268,00


    Thank?s

    Augusto

    ----- Original Message -----
  • edited October 2003
    Hi Augusto,

    For future reference, please do not post attachements to the newsgroup
    server. If you would like to send us an example, please send it to
    support@digital-metaphors.com.

    After looking at your application, I was able to get the correct results by
    moving the initialization of the Global 'nAcumulado' variable to the
    GlobalOnCreate event of the report. I also made the report OnePass which
    solved all other problems. Hope this helps.

    --
    Best Regards,

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