Using Crystal XI and Oracle DB.
I have a database field containing a set of values contained within {} which I've already been able to remove in most instances using a formula I found on Tek-Tips (Thanks lbass!!) for the display output. The formula which I modified slightly was:
stringvar array x := split({TABLE.FIELD},"}");
numbervar i;
numbervar j := ubound(x);
stringvar y := "";
for i := 1 to j do(
y := y + trim(extractstring(x,"","{")));
However, this sometimes leaves me with a string display starting with { followed by a series of numeric characters anywhere from 1 - 10 characters in length. What I would like is to trim the remaining part so that the resulting value would display properly. I can do this by continuing to declare stringvar and replacing for each instance I find but would like a more permanent solution.
Current formula output is something like: {2004042214HEIGHT*15.5/LENGTH
with the prefered output of: HEIGHT*15.5/LENGTH
BTW: Original output without formating is something like:
{this.2004042214.1.HEIGHT}*15.5/{this.1918.3.LENGTH}
I used some replace functions prior to the above formula to replace the "this." with "" and the ".1." or ".3." portions with a "}". In combination with the above formula, it works great unless the leading character is {.
I have a database field containing a set of values contained within {} which I've already been able to remove in most instances using a formula I found on Tek-Tips (Thanks lbass!!) for the display output. The formula which I modified slightly was:
stringvar array x := split({TABLE.FIELD},"}");
numbervar i;
numbervar j := ubound(x);
stringvar y := "";
for i := 1 to j do(
y := y + trim(extractstring(x,"","{")));
However, this sometimes leaves me with a string display starting with { followed by a series of numeric characters anywhere from 1 - 10 characters in length. What I would like is to trim the remaining part so that the resulting value would display properly. I can do this by continuing to declare stringvar and replacing for each instance I find but would like a more permanent solution.
Current formula output is something like: {2004042214HEIGHT*15.5/LENGTH
with the prefered output of: HEIGHT*15.5/LENGTH
BTW: Original output without formating is something like:
{this.2004042214.1.HEIGHT}*15.5/{this.1918.3.LENGTH}
I used some replace functions prior to the above formula to replace the "this." with "" and the ".1." or ".3." portions with a "}". In combination with the above formula, it works great unless the leading character is {.