I don't have access to directly amend the stored procedures that are used in our Crystal Reports, they're created by the company who's software we're using. In order to get around paying for the amend, I was wondering if there was the means to do what I need in a formula.
I'm OK with basic stuff CR formulae, but I can't work this out.
We receive a field of material composition for textiles that is generated as below. What I would like to do is to separate the different materials and reverse the order, so that the highest percentage is at the beginning of the string. Is anyone able to help? Or maybe the first question should be is this possible?
Thanks in advance!
Current Output:
Desired Output:
local stringvar input := "15% Other (RM0262), 15% Polylactic acid (PLA) (RM0198), 85% Cotton (RM0104)";
local stringvar output := "";
local stringvar delimiter := "";
local numbervar i;
local stringvar array originalArray := Split(input, ", ");
For i := Ubound(originalArray) to 1 step -1 do
(
output := output + delimiter + originalArray[i];
delimiter := ", ";
);
output;