Many thanks, MPB. That was helpful.
And to perhaps make this post more helpful to others...
I manually created the graph builder, collapsed the graph with the blue triangle, and got the script. The pertinent line was:
SendToReport( Dispatch( {}, "Graph Builder", OutlineBox, Close( 1 ) ) )
I saw that the command was "close(1)". In JSL, I then made a reference to the report of my graphbuilder object. Then I sent the outlinebox the message to close.
rpt=graphbuilder<rpt[outlinebox(1)]<
Note that I found out it was outlinebox(1) by using the "show tree structure" menu item that I accessed by right clicking on the blue triangle>>edit>>show tree structure.