Home Datapipelines

Calculation problem

edited January 2008 in Datapipelines
Dear All,

Using CodeGear 2007 + RB 10.07.

I am having problems calculating the correct values and hope someone can
point me in the right direction.

Setup is as follows:

Invoice [Main]
Order SubReport Band
OrderArticle SubReport Band [General Fields for all articles]
OrderArticle "A" SubReport Band [Specific fields for article
"A"]
OrderArticle "B" SubReport Band [Specific fields for article
"B"]
OrderArticle "C" SubReport Band [Specific fields for article
"C"]


whereby the Invoice band has a group header[ addres data] and a group
footer[summaries] pointing to "invoicenr"group. The Order SubReport Band has
the same setup but pointing to "ordernr"group.

I am not using a summary band because my customer wants the summaries at a
fixed position at the bottom of each page whereby when there are more pages
only the last page gives the vat and total amount and the intermediate pages
only the subresults for that page so I use the Invoice Group Footer Band for
this.

I have followed the calculation tip in the tech-tip newsgroup but it will
generate only the Subtotal value for one order instead of all orders
([Calculation set to: Value := Value + ORDERS['SUBTOTAL']; and timing to
Page End ). I have tried different settings as suggested but with no
results. Help!

Kind Regards,

Jerri

Comments

  • edited January 2008
    Hi Jerri,

    I'm a bit unclear about the calculation that is incorrect.

    1. Are you strictly using TppVariables? Where are the variables located in
    your report.
    2. Are you trying to calculate the grand total from the subreport inside
    the main report or are you keeping a running total (or other)?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited January 2008
    Hello Nico,

    First of all thanks for your assistence.

    Yes, I am using strictly Tpp variables which are located on the Group Footer
    of the Invoice Band [Main].

    My customers sends so called "collected invoice", basically one invoice
    consisting of
    multiple placed orders throughout a month. What I like to achieve is that
    one variable
    catches the subtotal value of each order and the second variable keeps track
    of the grand
    total of all orders.

    In this way when the invoice stretches over multiple pages only the last
    pages shows
    all amounts [gross grand total, vat, nett grand total] and all previous
    pages a cumulative
    som of that page and the page before that.

    i.e.

    page 1; euro 100
    page 2; euro 250 + page 1
    page 3; 350 [gross], 66,50 [vat], 416,50 [nett]

    Hopefully this clarifies the situation.

    Kind Regards,

    Jerri

  • edited January 2008
    Hi Jerri,

    If you are calculating the sum of a value inside a subreport from the main
    report, you will need to place another variable inside the subreport and use
    its OnCalc to update the value of the variable in the main report.
    Otherwise, you will not be calculating correctly on each traversal of the
    subreport.

    For the last page, I would recommend you try using the summary band. It is
    possible to reposition the band using the PrintPosition property and would
    make the printing of specific information only at the end of a report much
    easier.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

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