(urgent) help needed in writing this custom code

  • Hi,

    I have around 10 pairs of Description and its and value. and i am trying to write a custom code in this fashion in SSRS

    public function Format_ClosingBalance(PlatformId as integer,value8 as string, Totact8 as decimal, value10 as string,Totact10 as decimal) as decimal

    dim i as decimal

    If PlatformId = 1 Then

    i = Totact8

    Else

    Select Case Value8

    CASE "Closing Balance"

    i = Totact8

    Case value10

    Case "Closing Balance"

    i = Totact10

    End Select

    End if

    Return i

    end function

    So i will be passing around 10 - 15 values in to that function and i checking if value field in them is equal to closing balance then i want to display its respect totact value.

    any help will be appreciated..

    thanks

    Karen

  • Hi,

    use the code function in reporting services.

    That way you can use the script you have already written.

    here is an overview here

    http://www.sqlservercentral.com/articles/Development/2803/

    and http://www.odetocode.com/Articles/130.aspx

    HTH

    Simon

  • Thanks for the answer.. I got it work by Adding Rtrim next to the fields..

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

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