Subscribe Bookmark RSS Feed

Deleting Report Tables

mwechtal

Community Trekker

Joined:

Jan 19, 2012


I have been trying to customize a report by simply deleting some TableBoxs. I can get the first one to delete, but then I can't figure out what the code would be to delete the next two.

Doing some reading in "Jump into JMP Scripting", I was able to come up with:

Report( dist ) [TableBox(5)] << delete;

but I am unable to come up with the syntax to also delete TableBox(9) and TableBox(13).

Can anyone help?  Thanks!

Mike

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Ah, I've got it! I'm not sure if this is the only syntax, but this works:

Report( dist ) [TableBox(13)] << delete;

Report( dist ) [TableBox(9)] << delete;

Report( dist ) [TableBox(5)] << delete;

I haven't been able to figure out a way to do that in one statement. It seems like there should be a way to do that, but I'm not seeing it.

Mike

4 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Did you consider that the numbering may change when a deleting a db? The original TableBox(9) becomes TableBox(8) if TableBox(5) is deleted.

Try to delete them in reverse order. Or even better, address them by their name if possible.

For example:

Report(dist)["Summary Statistics"]<<delete

mwechtal

Community Trekker

Joined:

Jan 19, 2012

No, I hadn't considered the numbering changing. I will definately have to delete them in reverse order.

Unfortunately, it's a "sub-table" I'm deleting, so it has no name.

Mike

Solution

Ah, I've got it! I'm not sure if this is the only syntax, but this works:

Report( dist ) [TableBox(13)] << delete;

Report( dist ) [TableBox(9)] << delete;

Report( dist ) [TableBox(5)] << delete;

I haven't been able to figure out a way to do that in one statement. It seems like there should be a way to do that, but I'm not seeing it.

Mike

ms

Super User

Joined:

Jun 23, 2011

You can send a message to a list of display boxes:

r = Report( dist );

{r[Table Box( 13 )], r[Table Box( 9 )], r[Table Box( 5 )]} << delete;