- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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:
- Plot Graph Builder:
GrBld = Graph Builder( blah-blah-blah );
- Then I have to get a report reference:
reportGrBld = GrBld<<Report();
- 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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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 ) ) );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.