I have some code that is designed to build a report based on some filtering. It will be fed two lists, the first will determine which materials get pulled (in this example that will be Gender_List), the second determining which properties get graphed (In this example that will be Property_List). The idea being that there will be a loop through each Gender that will create a matrix of graphs for all selected properties. There is also an over-arching, unfiltered graph at the top of the report
There are two ways to do this.
The first with intrinsic where clauses in the graphs. I've mostly gotten this to work, except that the Where clause ends up taking up a position in the line up box. Also for some reason in the mockup I have below I have a bug that I don't entirely understand (my full version does not have that bug, but would still be curious if someone knows how to fix it). Here is the mockup code
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Gender_List = {"M","F"};
age_list = {12,13,14,15};
Property_List = {"Age", "Height", "Weight"};
w= new window("test",
VLB = V List Box ("A",
dt<<Distribution( Nominal Distribution( Column( :age ) ) );
);
);
for (j=1, j<= N Items (Gender_List), j++,
VLB << Append (Text Box(Gender_List[j]);
LB = LB = Lineup Box(n col (2), spacing(10));
for (i = 1, i <= N Items (Property_List), i++,
LB<<Append(
gb = dt<< Distribution( Continuous Distribution( Column( Property_List[i] ) ),
where (:Sex == Gender_List[j])
)
);
VLB <<Append(LB)
);
);
);
The second is with data filter context boxes that wrap each iteration of the loop of graphs. That one I haven't been able to get to work. If I can get the where version above to work I don't think I'll need to worry too much about the data filter context box/wrap.
Anyways, any thoughts on how to clean up the code above to remove those Where clauses from the line up box?