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

CalcOrder Problem

edited September 2004 in General
We have reports that use calculated fields. WHen these fields have
CalcOrder = 0 in RB6, they work correctly. However, when these same
reports are compiled under RB7, the CalcOrder is changed to a high
number (19 in this case) and therefore this affects the values of
fields that depended on that field to be calculated first.

We changed the CalcOrder from 0 to 1 and the problem is solved.

Was this an intentional change from RB6 to RB7? I can't find anything
in the release notes, online help, or Google.

Thanks

--
Jon Robertson
Borland Certified Advanced Delphi 7 Developer
MedEvolve, Inc
http://www.medevolve.com

Comments

  • edited September 2004
    Hi Jon,

    I'm not sure I completely understand what is happening. When you load a
    report template that was created in RB 6 into the designer of RB 7, the calc
    order of the TppVariables are changed to 19 and above? Then how is changing
    the calc order of a single variable from 0 to 1 solving the issue? In my
    testing, I created a template in RB 6 with 5 TppVariables in the detail band
    and their CalcOrder set from 0 to 4. Then I saved the template and loaded
    it in RB 7. The CalcOrders remained the same.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2004
    > I'm not sure I completely understand what is happening. When you

    Our project has numerous TppVariables. One of them (vrTotChg) had a
    CalcOrder of 0. I can confirm this by looking at the DFM directly or
    in D6/RB6.

    If I open the same project in D6/RB7 (different workstation),
    vrTotChg.CalcOrder is 19. I've verified that the DFM says
    vrTotChg.CalcOrder is 0 before I open the project in D6.


    After changing vrTotChg.CalcOrder to 1, the CalcOrder stays one even
    after repeated checkins/checkouts and project loads/unloads. (Of
    course, this is to be expected, but not what is happening when
    CalcOrder is 0).

    The value of vrTotChg is needed for several of the other TppVariables
    to calculate correctly. I would assume this is the whole point of
    CalcOrder. When vrTotChg is 19, the other TppVariables (that depend on
    vrTotChg) are calculated before vrTotChg is calculated.


    Hmph. I don't know what is causing this then. I've got a project that
    I can reproduce it with every time. I haven't tried creating a new
    project to demonstrate it. Provided that it is something unique to our
    existing projects, I'd be happy to submit one of them.

    Here's all I have to do with our project:
    1. Verify (using a text editor) the value for vrTotChg.CalcOrder in
    the DFM is 0.
    2. Open the project in D6/FB7.
    3. Open the form containing the report.
    4. Look at vrTotChg.CalcOrder in the Object Inspector. Instead of 0,
    it is 19.

    This project was actually created when we were using RB 5.5 and D4.
    It's been migrated through various versions of Delphi and RB. We're
    just now starting to use RB7, even though we've had it for a while. :(

    It is probably just a fluke with this report. If CalcOrder = 0 is
    valid in RB7, and there are no known issues with CalcOrder in RB7, then
    I shouldn't spend any more time on it. :)

    --
    Jon Robertson
    Borland Certified Advanced Delphi 7 Developer
    MedEvolve, Inc
    http://www.medevolve.com
  • edited September 2004
    Hi Jon,

    There are no known issues like this with RB 7 and the CalcOrder. If you
    would like, please send a sample of the template created in RB 6 in .zip
    format to support@digital-metaphors.com and I'll test it on my machine.

    --
    Best Regards,

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