Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- JMP User Community
- :
- Discussions
- :
- Force which data table a report is nested under.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Force which data table a report is nested under.

Mar 6, 2019 10:15 AM
(3966 views)

So I'm trying to change which data table a new window() report is nested under and it just seems that it's based on which data table is used first in a report. Is there a way to force this nesting?

```
Names default to here(1);
dt = open("$SAMPLE_DATA\Big Class.jmp");
dt << Bivariate(Y(:height), X(:weight));
dt_sum = dt << Summary(
Group( :age ),
Mean( :height ),
Mean( :weight ),
Freq( "None" ),
Weight( "None" )
);
//This will nest under dt_sum
new window("Summary First",
dt_sum << Distribution( Continuous Distribution( Column( :Name( "Mean(height)" ) ) ) ),
dt << Bivariate(Y(:height), X(:weight)),
);
//This will nest under dt
new window("Main First",
dt << Bivariate(Y(:height), X(:weight)),
dt_sum << Distribution( Continuous Distribution( Column( :Name( "Mean(height)" ) ) ) ),
);
```

Vince Faller - Predictum

2 REPLIES 2

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Force which data table a report is nested under.

I don't know whether there is a natural way to do this, but here is a workaround: start with a (computationally cheap, optimally) report from the table under which you want the new table nested, then delete this report if needed:

See the change in the last block of code, copied from yours:

```
//This will nest under dt_sum
new window("Summary First",
dt_sum << Distribution( Continuous Distribution( Column( :Name( "Mean(height)" ) ) ) ),
dt << Bivariate(Y(:height), X(:weight)),
);
//This will now also nest under dt_sum
new window("Main First",
dist1 = dt_sum << Distribution( Continuous Distribution( Column( :Name( "Mean(height)" ) ) ) ),
dt << Bivariate(Y(:height), X(:weight)),
dt_sum << Distribution( Continuous Distribution( Column( :Name( "Mean(height)" ) ) ) ),
);
dist1 << delete
```

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Force which data table a report is nested under.

Another way would be to use the sib prepend message--but oddly, I'm needing the wait() statement to pull that off. Try it with, and without, the wait() to see what I mean.

```
//This will now also nest under dt_sum
nw = new window("Main First",
rep1 = dt_sum << Distribution( Continuous Distribution( Column( :Name( "Mean(height)" ) ) ) ),
);
wait();
rep1 << Sib Prepend(
dt << Bivariate(Y(:height), X(:weight))
);
```

Article Labels

There are no labels assigned to this post.