sorting data in crystal report that contains a combination of strings and numbers -
i have read how sort data in crystal report, have different issue, data want sort contain description(string) , numbers, , want sorting according these numbers ascending.. data description of stock item plus weight in kg, sorting according weight.. data like:
- boxes / kg +300 kg
- boxes / kg +1000 kg
- boxes / kg +500 kg
- boxes / kg +25 kg
they must :
- boxes / kg +25 kg
- boxes / kg +300 kg
- boxes / kg +500 kg
- boxes / kg +1000 kg
so how sort them?
create formula below:
@splitstring stringvar s1; stringvar s2; numbervar n1; s1 := {stringformat_.stringvalue}[13 20]; s2 := s1[1 length(s1)-2]; n1 :=tonumber(s2);
place formula in report apply short on formula. after can suppress if required...
Comments
Post a Comment