Running value is off when the column is hidden

  • SSRS in VS008 SQL 2008 Matrix report by fiscal year(column) and location(row) . The output is like:
    Loc    FY2013-1    FY2013-2    FY2013-3    FY2014-1    FY2014-2 ...
    A    Expr    Expr    Expr    Expr    Expr
    B    Expr    Expr    Expr    Expr    Expr
    C    Expr    Expr    Expr    Expr    Expr
    I have the following custom code for running total
    Public Shared FYamt as Double=0
    Public Function FYrunningValue(ByVal amt as Double, ByVal mth as int32) as Double
    IF mth = 1 THEN
         FYamt = amt
    ELSE
        FYamt = FYamt + amt
    END IF
    RETURN FYamt
    End Function

    The expression to get the amount is:
    =Code.FYrunningValue(Fields!PaymentAmt.Value, Fields!FiscalMonth.Value)

    I do not want all the 12 months for every year, I want to show only the current fiscal month. If I hide the Year column accordingly, my totals are off.

Viewing 0 posts

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