This is a formula I am writing in Crystal Reports and vb is the closest thing to it so hopefully someone can figure this out.
I am dealing with a long string that looks like 0.0055;0;0;0;0. It looks like an array but doesn;t act like on. For example, I only need the first value but if I ask for myArray[1], I get "0", myArray[2] yields ".", etc. So I created this for loop to get what I want:
Basically it starts at 1 and goes until the first semicolon. It adds each value to the end of the string until it is finished.
Problem is for 0.0055;0;0;0;0, the resulting string is 005. Does anyone know what is going wrong here?
I am dealing with a long string that looks like 0.0055;0;0;0;0. It looks like an array but doesn;t act like on. For example, I only need the first value but if I ask for myArray[1], I get "0", myArray[2] yields ".", etc. So I created this for loop to get what I want:
Code:
numbervar i; stringvar str := ""; for i := 1 to instr(1,{lt_mtg_ins.pmi-pymt-ftrs},";")-1 Do ( str := str + {lt_mtg_ins.pmi-pymt-ftrs}[i]; i := i + 1; ); str
Problem is for 0.0055;0;0;0;0, the resulting string is 005. Does anyone know what is going wrong here?
Comment