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

problem in splitting string into characters


burasami

Recommended Posts

hai.. i am getting field from database which is string type. i want to split this string into character. i found the fuction called toCharArray() in the iReport-1.2.7 which result string as single deminsion array. when i compile my file its giving error as

can't able cast char[] to string.. how can i convert the string into single characters.. is there any other function to split string into characters?..

 

example:

i have got field called $F{Name} from database which is string type its having value as Name="KANNAN".. I want to split this string into characters.. such as 'K' 'A' 'N' 'N' 'A' 'N'... so i used the function toCharArray() such as $F{Name}.toCharArray() in text field expression. when i compiled my file its give error as can't able cast char[] into string... how can i solve this problem.. is any one aware of this error?

please help me its very urgent.. thanks in advance

here by attached the ms word file... [file name=Splitting_string.doc size=23552]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/Splitting_string.doc[/file]

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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...