simple report - Customer Balance.

WashoutWashout Member Posts: 24
Hi,

I am trying to write a report that returns the customers who have exceeded the credit limit.
my report has the following in Customer > ON PreDataitem()

CALCFIELDS(Balance);
SETFILTER("Credit Limit (LCY)", '<=%1',Balance);

but Balance is always 0.

I cant figure out why.

Comments

  • AlbertvhAlbertvh Member Posts: 516
    Hi
    Put your code in the AfterGetRecord
    CALCFIELDS(Balance); 
    IF "Credit Limit (LCY)" >= Balance THEN
      CurrReport.SKIP;
    
    

    Hope this helps.

    Albert
  • WashoutWashout Member Posts: 24
    Albertvh wrote:
    Hi
    Put your code in the AfterGetRecord
    CALCFIELDS(Balance); 
    IF "Credit Limit (LCY)" >= Balance THEN
      CurrReport.SKIP;
    
    

    Hope this helps.

    Albert

    Hi ALbert,

    This worked a treat. thank you.
  • kolaboykolaboy Member Posts: 446
    Hi,
    I kind of have similar problem.
    My problem is i want to sum all the customer balances by filter using Customer posting group in a report.
    For example:

    customer Posting group Total customer Balance

    TTTTT 7,090.987

    SSSS 8,908,564


    ""


    ""


    ETC
    can someone help me on this. Sample code to do the magic is welcome.
    Thanks
  • AlbertvhAlbertvh Member Posts: 516
    @ Washout - Glad to have helped

    @Kolaboy

    DataItem Customer
    properties
    DataItemTableView Customer Posting Group
    TotalFields Balance
    GroupTotalFields Customer Posting Group

    You will only need Section GroupFooter

    Hoper this helps


    Albert
  • kolaboykolaboy Member Posts: 446
    I have tried what you told me but it does not seem to work for me. I got it working by have the Customer posting group as the first Dataitem and the customer as second which is indented.
    Thanks
Sign In or Register to comment.