Jump to content
We've recently updated our Privacy Statement, available here ×

Arrays in jasper


kmn

Recommended Posts

Hi All,

How to implement the following array to a field in jasper

Dim list As String 
List = TRIM(UCASE(TranStat))
Dim array() As String 
Dim numberOfElements As Integer 
numberOfElements = ListToArray( list, array, "," )
Dim text2 As String
  'Dim temp As String
Dim i As Integer 
 
If Trim(LANG) = "" OR Trim(LANG) = "ENG" Then
For i = 1 To numberOfElements 
 
    If array(i)= "CANCELED" Then
  text2 = text2 & "Canceled,"
ElseIf array(i)= "EXECUTED" Then 
  text2 = text2 & "Executed Orders,"
ElseIf array(i)= "FAILING" Then 
    text2 = text2 & "Failing,"
ElseIf array(i)= "OPEN" Then 
    text2 = text2 & "Open Orders,"
ElseIf array(i)= "PENDFAIL" Then 
    text2 = text2 & "Pending and Failing,"
ElseIf array(i)= "PENDING" Then 
    text2 = text2 & "Pending,"
ElseIf array(i)= "UNVERIFIED" Then 
    text2 = text2 & "Unverified,"
ElseIf array(i)= "PENDCANC" Then 
    text2 = text2 & "Pending Cancellation,"
Else 
    text2 = text2 & array(i)
End If
 
  Next i 
text2 = Left(text2 ,(Len(text2 )-1))
 
Else
 
For i = 1 To numberOfElements 
 
    If array(i)= "CANCELED" Then
  text2 = text2 & "," & BtreeHelper.getTranslationNew("Canceled")
ElseIf array(i)= "EXECUTED" Then 
  text2 = text2 & "," & BtreeHelper.getTranslationNew("Executed Orders")
ElseIf array(i)= "FAILING" Then 
    text2 = text2 & "," & BtreeHelper.getTranslationNew("Failing")
ElseIf array(i)= "OPEN" Then 
    text2 = text2 & "," & BtreeHelper.getTranslationNew("Open Orders")
ElseIf array(i)= "PENDFAIL" Then 
    text2 = text2 & "," & BtreeHelper.getTranslationNew("Pending and Failing")
ElseIf array(i)= "PENDING" Then 
    text2 = text2 & "," & BtreeHelper.getTranslationNew("Pending")
ElseIf array(i)= "UNVERIFIED" Then 
    text2 = text2 & "," & BtreeHelper.getTranslationNew("Unverified")
        ElseIf array(i)= "PENDCANC" Then 
    text2 = text2 & "," & BtreeHelper.getTranslationNew("Pending Cancellation")
 
Else 
    text2 = text2 & array(i)
End If
  Next i 
text2 = Right(text2 ,(Len(text2)-1))
End if 
 
 
Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...