cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
miguello
Level VI

Question on windows and reports

All,

 

I have a problem that probably originates from lack of understanding how things work in JSL.

So, here it is:

 

I have an app that plots some graphs through Graph Builder and puts them in new window that has several tabs on them.

No, I have to do the following:

  1. Plot Graph Builder:
    GrBld = Graph Builder(
    blah-blah-blah
    );
  2. Then I have to get a report reference:
    reportGrBld = GrBld<<Report();
  3. Then only I can start assembling my tabbed window:
    tabPlot1 = Tab Page Box("GraphBuilder plot", reportGrBld);
    tabPlot2 = Tab Page Box("Something else", someOtherReport);
    tabPlot3...
    ...
    tabbedResults = Tab Box(tabPlot1, tabPlot2, tabPlot3, tabPlot4);
    New Window("Results", tabbedResults);

It all works fine, with one exception - the plots become static. So, I cannot use all the perks of GraphBuilder or any other graphing platform - i.e. if I click an item in Legend, it won't highlight those points on the plot. If this report is Tabulate - table will be static, all filters that I have scripted won't show, etc.

 

I can click red triangle and select "re-run script" and all that stuff appears, but not in the assembled tabbed window.

Now, if I just say:

tabPlot1 = Tab Page Box("GraphBuilder plot", GrBld);
tabPlot2 = Tab Page Box("Something else", someOtherReport);
tabPlot3...
...
tabbedResults = Tab Box(tabPlot1, tabPlot2, tabPlot3, tabPlot4);
New Window("Results", tabbedResults);

it won't work.

 

 

Question - how to construct a tabbed window with all your results, and have a live GraphBuilder or any other platform with all their interactive features, not a static, "dead" report version of it?

1 ACCEPTED SOLUTION

Accepted Solutions
miguello
Level VI

Re: Question on windows and reports

Looks like the key was to use this:

GrBld = dt1 << Graph Builder(nada-nada-nada);

which would produce a different type of object (display box?). At least "Graph Builder" words changed color and I can now append GrBld to different things.

 

View solution in original post

3 REPLIES 3
Phil_Brown
Super User (Alumni)

Re: Question on windows and reports

You don't want to use Report() in this case. I find Report useful when you need a reference to a platform's output to be able to mine the results displayed (through displaybox scripting). This is quickly seen in the example below.

 

Note that both biv and bivRpt both produce output but are different object types. biv is "Bivariate[]" and bivRpt is "DisplayBox"

 

 

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = Bivariate( Y( :weight ), X( :height ), Fit Line );

biv << LocalDataFilter(

 Add Filter(

  columns( :age, :sex ),

  Where( :age == {13, 14, 15, 16} ),

  Where( :sex == "M" ),

  Display( :age, Size( 160, 90 ), List Display )

 )

);



bivRpt = Report( Bivariate( Y( :weight ), X( :height ), Fit Line ) );




bivRpt << showTreeStructure;


NewWindow("Biv's Report", bivRpt);

 

 

 

 

For what you want to do, which is the custom arrangement of live charts and analysis, I would do the following:

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Profit by Product.jmp" );


gb1 = Expr(
	Graph Builder(
		Show Control Panel( 0 ),
		Variables(
			X( :Quarter ),
			Y( :Revenue ),
			Y( :Product Cost, Position( 1 ) ),
			Y( :Profit, Position( 1 ) ),
			Wrap( :Product Line )
		),
		Elements( BoxPlot( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 6 ) ) )
	)
);



gb2 = Expr(
Graph Builder(
	Show Control Panel( 0 ),
	Variables(
		X( :Quarter ),
		Y( :Revenue ),
		Y( :Product Cost, Position( 1 ) ),
		Y( :Customer Service Cost, Position( 1 ) )
	),
	Elements(
		Line( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 6 ) ),
		Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 6 ) )
	)
)
);


New Window( "", 

Tab Box( Tab Page Box( "Graph1", gb1 ),

Tab Page Box( "Graph2", gb2 )

) );

 

 

PDB
miguello
Level VI

Re: Question on windows and reports

Looks like the key was to use this:

GrBld = dt1 << Graph Builder(nada-nada-nada);

which would produce a different type of object (display box?). At least "Graph Builder" words changed color and I can now append GrBld to different things.

 

miguello
Level VI

Re: Question on windows and reports

I will add - ...append do different things and it being live. Previously it was either live and I couldn't append it, or it was "reported", I caould append it, but it wasn't live.