running total fields+formula

edited 12:04AM in FastReport 3.0
How to make report like this
A B C
1000000 0 1000000
1000000 0 2000000
500000 0 2500000
0 1000000 1500000

usually i use crystal report for make this report.

Column A, B dataset
Column C result

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 12:04AM
    assuming a is in memo 1 b is in memo 2 and result is in memo3
    ie in memo3
    [<data."fieldname> + <data."fieldname>]
    ;)

  • edited 12:04AM
    It didn't work for me...
    it adds just fine, but then when it goes to the next line it dosen't pass the value to the next line...

    himen did you get any results??
  • gordkgordk St.Catherines On. Canada.
    edited 12:04AM
    to display running total in 3rd memo
    declare your own variable of correct type at start of on reprt code page

    mytot :extended;
    initialize to 0, either in begin end block at bottom of page or in obp event of a header band.
    in obp event of data band write code
    mytot := mytot + (<data."fieldname> operator <data."fieldname>);
    in memo3 use [mytot]
    ;)

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.