Hey all,
Using Crystal XI. Does anyone know the best way to do this?
Please see the 3 scenarios (invoices) below:
(1) The whole invoice is free-form text in {Invoice.InvoiceText} field of data type, MEMO.
(2) I need to grab the Length (Size of Accessory). EX: For Invoice #1, that would be 5.0
(3) I will then need to transform the string (5.0) into number type, then calculate the Average Length for all invoices.
Solution:
(1) I just need to grab the LENGTH (first dimension) for Size of Accessory. I want to grab the substring (5.0) AFTER "Size of Accessory" and before the first instance of "cm" (associated with Size of Accessory). I want to grab a substring LIKE "Size of Accessory*cm", but that won't work because there are numerous instances of "cm" afterwards on the invoice. Or...I could grab a substring LIKE "Size of Accessory*Item Type" (to limit substring and avoid other instances of "cm" in invoice), but sometimes there are Additional Dimensions for Size of Accessory (ex: Invoice #2 and #3).
Problem: Also, I can't grab the first "number" after Size of Accessory because they're actually characters in MEMO field.
Thanks for your help!
------------
INVOICE #1
------------
Item: Dominoes
Color: Black,White
Size of Item: Length:2.5cm
Size of Accessory: Length:5.0cm
Item Type: Toy
Quantity: 100
Size of Box: Length:60cm
------------
INVOICE #2
------------
Item: Dominoes
Color: Black,White
Size of Item: Length:2.5cm
Additional dimensions: 1.0cm X 0.5cm
Size of Accessory: Length:4.0cm
Additional dimensions: 4.0cm X 4.5cm
Item Type: Toy
Quantity: 100
Size of Box: Length:60cm
------------
INVOICE #3
------------
Item: Dominoes
Color: Black,White
Size of Item: Length:2.5cm
Comment(s): A. 1.0cm B. 0.5cm
Size of Accessory: Length:7.0cm
Comment(s): A. 7.0cm B. 7.5cm
Item Type: Toy
Quantity: 100
Size of Box: Length:60cm
Using Crystal XI. Does anyone know the best way to do this?
Please see the 3 scenarios (invoices) below:
(1) The whole invoice is free-form text in {Invoice.InvoiceText} field of data type, MEMO.
(2) I need to grab the Length (Size of Accessory). EX: For Invoice #1, that would be 5.0
(3) I will then need to transform the string (5.0) into number type, then calculate the Average Length for all invoices.
Solution:
(1) I just need to grab the LENGTH (first dimension) for Size of Accessory. I want to grab the substring (5.0) AFTER "Size of Accessory" and before the first instance of "cm" (associated with Size of Accessory). I want to grab a substring LIKE "Size of Accessory*cm", but that won't work because there are numerous instances of "cm" afterwards on the invoice. Or...I could grab a substring LIKE "Size of Accessory*Item Type" (to limit substring and avoid other instances of "cm" in invoice), but sometimes there are Additional Dimensions for Size of Accessory (ex: Invoice #2 and #3).
Problem: Also, I can't grab the first "number" after Size of Accessory because they're actually characters in MEMO field.
Thanks for your help!
------------
INVOICE #1
------------
Item: Dominoes
Color: Black,White
Size of Item: Length:2.5cm
Size of Accessory: Length:5.0cm
Item Type: Toy
Quantity: 100
Size of Box: Length:60cm
------------
INVOICE #2
------------
Item: Dominoes
Color: Black,White
Size of Item: Length:2.5cm
Additional dimensions: 1.0cm X 0.5cm
Size of Accessory: Length:4.0cm
Additional dimensions: 4.0cm X 4.5cm
Item Type: Toy
Quantity: 100
Size of Box: Length:60cm
------------
INVOICE #3
------------
Item: Dominoes
Color: Black,White
Size of Item: Length:2.5cm
Comment(s): A. 1.0cm B. 0.5cm
Size of Accessory: Length:7.0cm
Comment(s): A. 7.0cm B. 7.5cm
Item Type: Toy
Quantity: 100
Size of Box: Length:60cm