Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
karenros
Starting Member
37 Posts |
Posted - 2008-06-20 : 12:25:19
|
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 decimaldim i as decimal If PlatformId = 1 Then i = Totact8Else Select Case Value8 CASE "Closing Balance" i = Totact8 Case value10 Case "Closing Balance" i = Totact10End SelectEnd if Return iend 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.. thanksKaren |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-20 : 13:04:29
|
The code looks ok. Are you getting any error? |
|
|
karenros
Starting Member
37 Posts |
Posted - 2008-06-20 : 14:52:40
|
Thanks for you answer visakh.. it worked fine after i gave rtrim in the Fields!Columnname.value |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-20 : 15:00:47
|
quote: Originally posted by karenros Thanks for you answer visakh.. it worked fine after i gave rtrim in the Fields!Columnname.value
No worries. Feel free to post a question whenever you're in doubt. |
|
|
|
|
|