Row Wise Balance

  • Hi

    I have below query and i want to display row wise Balance in SSRS 2008

    Select A.[No_],
    (select sum([Amount]) from [D $Detailed Cust_] where [Posting Date] < @frDate and [Customer No_] = @Cust) as OpgAmount,
    B.[Document No_],B.[Posting Date],B.[Debit Amount] as DbAmount,(B.[Credit Amount]) as CrAmount FROM [D $Customer] as A inner join
    [D $Detailed Cust_] As B on A.[No_] = B.[Customer No_]
    where A.[No_] = @Cust and [Posting Date] between @frDate and @toDate

    Thanks

  • Not sure what you mean by "Row Wise balance". Is this simply Credit Amount - Debit Amount? That would be:
    =Fields!CrAmount.Value - Fields!DbAmount.Value

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi 
      That is ok . But before Detail Transactions i display opening Balance . How to sum that

       Opening Balance  100.00 Dr

    Date                  Debit            Credit           Balance
    08/10/2017        50.00                                 150.00
    19/10/2017                              75.00              75.00

    Balance                                                          75.00

    Thanks

  • Add Opening Balance too. You can have more than two fields in an expression.. Opening Balance + Credit - Debit = Closing Balance

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi

      Closing Balance is o.k But row wise Opening to be added only once . How that can be done

    Thanks

  • jagjitsingh - Saturday, November 4, 2017 8:01 AM

    Hi

      Closing Balance is o.k But row wise Opening to be added only once . How that can be done

    Thanks

    Give us some sample data and expected results.  There's obviously a communication issue here, so instead of trying to tell us what you want, show us what you want.  There are instructions in my signature on how to create sample data.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply