How to Achive Running Total of field

keturpatelketurpatel India
edited December 2009 in FastReport Studio
Dear all,

I wish to create a simple list report, which shows running total. After days of trying various styles, i was unable to do it.

Report consist of only one band Master data, which is bound to one table. It consists of following fields -
Item Name, Quantity, Rate, Amount, Total Amount.

All fields are coming from table except last (Total amount) field. Sample report format is in attached file.

Any kind of help is very appreciated.

Thanks in Advance.

Comments

  • edited 1:14PM
    Dear keturpatel, attach the report file (*.fr3), please.
  • keturpatelketurpatel India
    edited 1:14PM
    Dear OlegK,

    Thanks for reply.


    I had tried various option to achive the goal but yet cannot find exact solution for this.

    I am attaching Fastreport file as per your request. It contains two fields only. I want running sum of Qty field, which increments row by row and does not reset anytime.

    I had also tried to create a function which does total and increments value in memo field, but due to lack of proper documentation and my limited knowledge to all supporting script languages, i did not make it. I think we can get the result only by creating custom function. Please check code tab of report to see what i did tried.


    P.s. I want running total on same line as of other data (not on group footer or any line bolow)
  • edited 1:14PM
    Dear keturpatel, see attached report.
  • keturpatelketurpatel India
    edited December 2009
    Dear OlegK,


    Thanks for such a nice reply. This is all i wanted.


    Here, i would like to add one more question. Do you know, how to add a custom function in report using vb6 code? As this report will be created at runtime based on user's selection. I THINK WE NEED TO USE TFastScript. BUT NOT KNOW HOW ! If you can provide me solution for that, i will be obliged.


    Thanks a lot again.
  • edited 1:14PM
    wrote:
    how to add a custom function in report using vb6 code?
    See a demo in "Program Files\FastReports\FastReport Studio\Examples\VisualBasic\VB6_Demo\Events".
  • keturpatelketurpatel India
    edited 1:14PM
    Dear OlegK


    I will check it. Thanks for reply.

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.