Error sum of column in SSRS 2008

  • Hello,

    I used the code below to fill in the details of a column and calculate the sum.

    On the detail band I have the expression =Code.MajTotal(Fields!Quantity.Value) and on the footer band the column has the expression =Code.ColTotPCollective.

    The report works well with SSRS 2005 but with SSRS 2008, the sum is multiplied by 2, as if the function MajTotal was called 2 times for each detail.

    Could you help me to solve this problem?

    Thank you in advance.

    ---- Honi

    Here is the code:

    '--------------------------------------------------------------------------------

    ' Declarations

    '--------------------------------------------------------------------------------

    Public ColTotPCollective As Double = 0

    Public Function MajTotal(ByVal vpVal As Double) As Double

    ColTotPCollective = ColTotPCollective + vpVal

    MajTotal = vpVal

    End Function

  • Add a counter that increments every time the function is called and then display the value to check if it is indeed being called more than once.

Viewing 2 posts - 1 through 1 (of 1 total)

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