IanWaterman
Programmer
I have to design a Treasury report grouped by Region, each fund can allocate money to up to 7 regions, this is stored in a 2 column table eg
ACC_ID ACC_REF
1 A
2 ABCD
3 BC
4 EFG
I need to be able to filter the report so that say I only want to see funds in Region B
I have created the following formula
Local NumberVar n:=1;
Local NumberVar counter:= length({ACCREF.ACC_REF});
StringVar array Region:=["","","","","","",""];
while counter>= n do
(Region[n] := {ACCREF.ACC_REF}[n];
n:=n+1);
This creates my array and stores the Region codes, but now I can not seem to use it against a Parameter value.
If I put in selection formula
{?Region} in Region
I get the error "Array must be subscripted Array" but if I do this I limit the array to only one entry, I have also tried
{?Region} = Region and get same error.
Two questions
1. If this is the right approach how do I use it in Selection.
2. Is there a better way of doing this.
Thanks in advance
Ian
ACC_ID ACC_REF
1 A
2 ABCD
3 BC
4 EFG
I need to be able to filter the report so that say I only want to see funds in Region B
I have created the following formula
Local NumberVar n:=1;
Local NumberVar counter:= length({ACCREF.ACC_REF});
StringVar array Region:=["","","","","","",""];
while counter>= n do
(Region[n] := {ACCREF.ACC_REF}[n];
n:=n+1);
This creates my array and stores the Region codes, but now I can not seem to use it against a Parameter value.
If I put in selection formula
{?Region} in Region
I get the error "Array must be subscripted Array" but if I do this I limit the array to only one entry, I have also tried
{?Region} = Region and get same error.
Two questions
1. If this is the right approach how do I use it in Selection.
2. Is there a better way of doing this.
Thanks in advance
Ian