SUM Problem (or Trick)

Hello,

Does anybody know how to do next SUM?

1. How to put SUM of all fields on one page in the footer of that page?
2. How to transfer this sum ( point 1) to the header of the next page ( page + 1)?
3. How to transfer this sum and all other sum of another page on the last page?

This is a SUM problem...

Thanks to All ;)

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:39AM
    place memos in the footer and use sumfunctions extended syntax
    ie
    mdband name band1
    has 3 memos containg [tbl."fld1"] [tbl."fld2"] [tbl."fld3"]
    in footer
    3 memos each would contain [Sum([tbl1."fld1"],band1,1)] and so on.

    better to use a column footer and column header band

    for the same memos in the colum header
    use an if function
    [if expression truevalue,falsevalue] in each memo

    [if [page#]> 1 ,[Sum([tbl1."fld1"],band1,1)],0] and so on
    build the memos expression using the expression builder to get the syntax correct.

    if this does not give you the correct totals in the header
    then you will have to make report 2pass
    and use arrays to gather each field's sum in footer on first pass
    and then use an if finalpass then code block in the obp of the header sub the values stored in the arrays

    if you need info on arrays see the reports demo grouptotals in header for an example.
    ;)


  • edited 9:39AM
    Coool, thanks man!
    Thats It!!! ;)
  • edited 9:39AM
    gordk wrote:
    place memos in the footer and use sumfunctions extended syntax
    ie
    mdband name band1
    has 3 memos containg [tbl."fld1"] [tbl."fld2"] [tbl."fld3"]
    in footer
    3 memos each would contain
    better to use a column footer and column header band

    for the same memos in the colum header
    use an if function
    [if expression truevalue,falsevalue] in each memo

    [if [page#]> 1 ,[Sum([tbl1."fld1"],band1,1)],0] and so on
    build the memos expression using the expression builder to get the syntax correct.

    if this does not give you the correct totals in the header
    then you will have to make report 2pass
    and use arrays to gather each field's sum in footer on first pass
    and then use an if finalpass then code block in the obp of the header sub the values stored in the arrays

    if you need info on arrays see the reports demo grouptotals in header for an example.
    ;)
    but [Sum([tbl1."fld1"*tbl1."fld2"],band1,1)] is sometimes incorrect data,
    i test with fr3.03&3.05

    thanks
  • edited 9:39AM
    but [Sum([tbl1."fld1"*tbl1."fld2"],band1,1)] is sometimes incorrect data,
    i test with fr3.03&3.05

    thanks
  • gordkgordk St.Catherines On. Canada.
    edited 9:39AM
    This forum is not for fr3 it is for fr2.5
    so do not expect anything answered here to work in fr3.
    go to fr3 forum or fr3 newsgroup for questions and answers on fr3.
    ;)
  • edited 9:39AM
    thank your advice, i go to fr3 forum

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.