debet, credit, saldo in fast report

edited 9:42AM in FastReport 4.0
need advice, I want to make a statement of cash I have to calculate the balance constraint
so this is the case
================
debit | credit | balance
================
500 | 0 | 500
0 | 1000 | -500
750 | 0 | 250
existing data just continues to debit the same credit how to make a statement like that yes with sql server database. thank you

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:42AM
    use a variable in the balance memo
    write code in obp event of band to set the variables value.
    Balance := Balance + ((<datasetname."debit">) - (<datsetname."credit">));
    declare your variable at the top of the code page not within in the procedure.
    you will also need to initialize the variable in a group header band.
  • edited 9:42AM
    I've found another example how to make it by using FR agregate functions.
    The documentaction (I use one of 4.6 dated 2008) says about it in chapter 3.6 "Agregate functions".

    If you use (see there are only TWO actual params to function SUM):

    [SUM(<Groups."ItemsTotal">, MasterData1)]

    then you get result like in the first picture. But if you use (see there are THREE actual params to function SUM):

    [SUM(<Groups."ItemsTotal">, MasterData1,2)]

    then you get result like in the second picture.


    Mick
  • gordkgordk St.Catherines On. Canada.
    edited 9:42AM
    Mick you are showing him how to use it in a group footer not in each line of the masterdata
  • edited 9:42AM
    Thanks GordK, you're right :-)
    I didn't notice this should be print on masterband :-(

    Mick
  • edited 9:42AM
    I just have the same problem.Hope can be solved soon.

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.