SQL Server Performance

Function call giving an error

Discussion in 'SQL Server 2005 Reporting Services' started by vdeepacssrs, Mar 8, 2007.

  1. vdeepacssrs New Member

    Hello all,

    This is the Function:

    Public Dim GrossValue As double = 0.00

    Public Function GetGrossValue(ByVal dPymt as Double,ByVal dFlag as Boolean) As Double
    If(dFlag = False) Then
    GrossValue = GrossValue + dPymt
    Return GrossValue
    Return 0.00
    End If
    End Function

    Public Function ResetValue()
    GrossValue = 0.00
    End Function

    I am calling this function in a textbox


    I DO NOT KNOW where I am doing wrong. But it is giving me "The Value expression for the textbox ''textbox200" contains an error: Input string was not in correct format.

    Please help

  2. ranjitjain New Member

    I'm not familiar with RS but I know some VB and based on your error, i can make a wild guess.

    consider this:

    replace it with

    Here I replaced Fields!IsEarnCancelled.Value with FALSE because this part will be called only when IIF finds the value other than TRUE.
    If it runs correctly, then you can even remove passing boolean flag which I think not required then.
  3. vdeepacssrs New Member

    Thanks Ranjith for the response.

    I have replaced my code with the code that you sent accross, but it is still giving an error. The result's are showing perfectly fine in both the cases but it is showing Warning Message like this "The Value expression for the textbox textbox200" contains an error: Input string was not in correct format."


Share This Page