I would do this using XPath like Jim already suggested. You can send << Get XML to your report and see the XML, then find what could be used to build your query
Quickly checking it looks like there isn't anything that would always work (helpKey isn't always the same and it seems to be also dependent on the analysis) so you might have to modify the query depending on your data
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
vlb = V List Box(
dt << Fit Group(
Bivariate(
Y(:height),
X(:weight),
Fit Line({Line Color({76, 114, 176})}),
Fit Spline(0.1, {Line Color({221, 132, 82})})
),
Bivariate(
Y(:weight),
X(:height),
Fit Line({Line Color({76, 114, 176})}),
Fit Spline(0.1, {Line Color({221, 132, 82})})
)
)
)
);
obs = vlb << XPath("//IfBox/OutlineBox"); // might collapse too much, but you could limit it to the specific reports
obs << Visibility("Collapse");
Other option would be to first get the outlinebox names from the ListBox (I would use XPath for this)
And then you can loop over those titles and hide corresponding outlineboxes (this can be built in many different ways)
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = New Window("",
vlb = V List Box(
dt << Fit Group(
Bivariate(
Y(:height),
X(:weight),
Fit Line({Line Color({76, 114, 176})}),
Fit Spline(0.1, {Line Color({221, 132, 82})})
),
Bivariate(
Y(:weight),
X(:height),
Fit Line({Line Color({76, 114, 176})}),
Fit Spline(0.1, {Line Color({221, 132, 82})})
)
)
)
);
reports = vlb << XPath("//OutlineBox[@helpKey = 'Bivariate Report']");
For Each({rep}, reports,
tebs = rep << XPath("//ListBox/ListBox[PopupBox and CustomBox]/TextEditBox");
ob_titles = tebs << get text;
For Each({ob_title}, ob_titles,
rep[OutlineBox(ob_title)] << Visibility("Collapse");
);
);
-Jarmo