Showing posts with label plz. Show all posts
Showing posts with label plz. Show all posts

Tuesday, March 27, 2012

case statement

is it possible to use the case statement in the reports.plz give the example
thanksIn Report Properties there's a code tab.
There you can write function like this:
Public Function DisplayLink(ByVal Country, ByVal ShipPostalCode) As String
Dim strMapLink As String
Dim _PostalCode As String = ShipPostalCode.ToString()
Dim _Country As String = Country.ToString()
Select Case _Country
Case "USA"
strMapLink="string1"
Case "France"
strMapLink="string2"
Case "Germany"
strMapLink="string3"
Case Else
strMapLink = ""
End Select
Return strMapLink
End Function
"ter" wrote:
> is it possible to use the case statement in the reports.plz give the example
> thanks|||There is also a case/switch function in RS (like iif). Don't know the exact
syntax by now, but look at the newer posts. There was a guy with the same
prob of you. he
"ש×?×?×?" wrote:
> In Report Properties there's a code tab.
> There you can write function like this:
> Public Function DisplayLink(ByVal Country, ByVal ShipPostalCode) As String
> Dim strMapLink As String
> Dim _PostalCode As String = ShipPostalCode.ToString()
> Dim _Country As String = Country.ToString()
> Select Case _Country
> Case "USA"
> strMapLink="string1"
> Case "France"
> strMapLink="string2"
> Case "Germany"
> strMapLink="string3"
> Case Else
> strMapLink = ""
> End Select
> Return strMapLink
> End Function
> "ter" wrote:
> > is it possible to use the case statement in the reports.plz give the example
> > thanks