none
Sum value from RDLC report function ? RRS feed

  • Question

  • Hi
    I am using C# VS2010.With my report I am having function for sum the value by condition.It's working good, but as a starting value it's bringing from the previous period.Hence how to clear this problem?
    Thank you

    my function code
    -----------------
    Public MyValue as Decimal = 0 
    Public Function MyAddToSum(ByVal mytax as Decimal) as Decimal 
    MyValue = mytax + MyValue 
    Return MyValue 
    End Function 
    My text box expression
    ----------------------
    =Code.MyAddToSum(SUM(IIF(Fields!tax.Value="VAT", Fields!cst_vat_amount.Value, 0)))

    Output
    ---------
    date             cst_vat_amount
    01/01/2016 100.00
    code.MyAddToSum() showing the startup value 10100.00, the value10000 coming from
    unknown period. Therefore how to clear this problem?

    Thanks for the Guidances and helps
    Thanks again

    What I have tried:

    I try to add only the field cst_vat_amount from the dataset when the field tax="VAT"


    U.PARANTHAMAN

    Sunday, April 3, 2016 2:06 AM