on 10-09-2008 1:50 PM
Folks,
could do with a quick pointer in the right direction.
I've got 30 currency fields held at the detail level of a report. I'm trying to pull out only those values that have a value. I thought the best way would be to use an array......
Field1: £0.00
Field2: £0.00
Field3: £10.00
Field4: £2.00
Field5: £0.00
Field6: £1.00
etc.
So, I need to pull out Field3: £10.00; Field4: £2.00; Field6: £1.00...both the field value and its position in the array.
cheers,
dom
in addition.....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
no worries,
i've sussed it....
local numbervar counter;
local numbervar i:=1;
local stringvar str:="";
local currencyvar array X:=[{Field1},{Field2},{Field3},{Field4},{Field5}];
for counter := 1 to 5 do
(if X[Counter]>$0 then
str:=str + cstr(counter) + " - " +cstr(X[counter])+ " "
);
str
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
in addition.....
this will return a string of various length of the format:
1 - X[1] 2 - X[2] 3 - X[3]
depending how many values in the array are > than $0
is there any way to either format the output like such:
1 - X[1] 2 - X[2] 3 - X[3]
and/or
insert a carriage return between each part:
1 - X[1]
2 - X[2]
3 - X[3]
........thought about either HTML or using Chr13 but not sussed it yet.
ideas?
cheers,
Dom
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.