SQL Server Performance

create account balance

Discussion in 'SQL Server 2005 Reporting Services' started by okboy, Aug 15, 2007.

  1. okboy New Member

    how to use SRSS to create account balance?
    example :
    DEBIT CREDIT Balance
    500 500
    200 700
    300 400
    the depit and credit i already use sql query to display it, now just the balance dont know how to use SRSS to do.
    so somebody can help?
  2. satya Moderator

  3. dineshasanka Moderator

    you can create a data set with running total. Following is an example.
    SalesOrderId, OrderDate=convert(char(10),OrderDate,111), TotalDue,[Running Total]from
    Sales.SalesOrderHeader sohCROSS APPLY
    select [Running Total]=sum(TotalDue) from Sales.SalesOrderHeaderwhere
    SalesOrderID <= soh.SalesOrderIDand
    year(OrderDate)=2001 and month(OrderDate)=7) as RTwhere
    year(OrderDate)=2001 and month(OrderDate)=7order
    by OrderDate;
  4. okboy New Member

    thank you all your reply....[:)]
    this is my writing methods, it can run successfully...!!RunningValue(Fields!Debit.Value, sum, nothing) - RunningValue(Fields!Credit.Value, sum, nothing)
  5. dineshasanka Moderator

    oh yes I forgot the RunningValue function in SSRS

Share This Page