cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
ALopez
Level III

Lineup box disappears upon Save as Report MyReport.jrp

I have a script that creates a window with three tabs.  The first tab has a Lineup Box with two columns and 6 Graph Builder graphs created with a loop.

nw = New Window( "Win1", tbox = Tab Box(Tab Page Box("Age", vlb = Lineup Box( N Col( 2 )) )) );

All the graphs generated by the loop are appended with:

vlb << Append(   
    Graph Builder("graph stuff here");

At the end everything looks as expected two graphs per row (two columns).

However, when I save it as a “Report” (with an embedded table) the Lineup box disappears from the code!

And I get:

New Window( "Win1",
	Tab Box(
		Tab Page Box(
			"Age",
			Graph Builder("graph stuff here");

Is there a way to preserve the original arrangement of the graphs in two columns? Is this a property or a lack of property of the type of “boxes” that I am using ?

I will appreciate some suggestions to try.

 

 

4 REPLIES 4
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Lineup box disappears upon Save as Report MyReport.jrp

I think this is a bug, you might consider sending this to support@jmp.com.  Note that without saving as a report, if you select Save Script > To Script Window (All Objects) you also get tab boxes instead of lineup boxes.

 

In the meantime, a work around might be to distribute a script file instead of the report file.  In the data table, you can select copy table script from the red triangle above the column list, and then paste that into your script.  Include '//!' on the first line of the script so it automatically executes, and then save that as a .jsl file (file size should jrp file, they both save the table as text). 

 

To make it act more like a report, you could open the table as invisible or private, and then close it automatically when the window closes.

 

Here is an example, save this as a .jsl file:

//!
Names default to here(1);

dt = New Table( "Subset of Big Class 2",
	Add Rows( 18 ),
	New Column(
		["en" => "age", "ja" => "年齢", "x-id" => "S_age_Col", "zh-CN" => "年龄"],
		Numeric, "Ordinal", Format( "Fixed Dec", 5, 0 ),
		Set Values(
			[12, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 16, 16, 16, 17, 17, 17]
		),
		Set Display Width( 0 )
	),
	New Column(
		["en" => "height",
		"ja" => "身長(インチ)",
		"x-id" => "S_height_Col",
		"zh-CN" => "身高"],
		Numeric, "Continuous", Format( "Fixed Dec", 5, 0 ),
		Set Values(
			[61, 66, 51, 61, 65, 58, 63, 63, 64, 62, 64, 67, 65, 60, 68, 62, 68, 70]
		),
		Set Display Width( 0 )
	),
	New Column(
		["en" => "weight",
		"ja" => "体重(ポンド)",
		"x-id" => "S_Big_Class_weight_Col",
		"zh-CN" => "体重"],
		Numeric, "Continuous", Format( "Fixed Dec", 5, 0 ),
		Set Values(
			[123, 145, 79, 107, 98, 95, 84, 93, 99, 92, 112, 128, 112, 115, 128, 116,
			134, 172]
		),
		Set Display Width( 0 )
	),
	Invisible
);

nw = New Window( "Win1", tbox = Tab Box(Tab Page Box("Age", vlb = Lineup Box( N Col( 2 )) )) );

nw << On close( try( Close( dt, "nosave" ) ) );

ages = associative array(dt:age) << get keys;

for(i=1, i<= n items(ages), i++,
	Eval( Eval Expr( 
		vlb << Append(   
			Graph Builder(
				Size( 534, 456 ),
				Show Control Panel( 0 ),
				Variables(
					X( :height ),
					Y( :weight ),
					Overlay( Transform Column( "Is " || char( ages[i] ) , Nominal, Formula( :age == Expr( ages[i] ) ) ) )
				),
				Elements( Points( X, Y, Legend( 7 ) ) ),
				SendToReport(
					Dispatch( {}, "graph title", TextEditBox, {Set Text( "Hight and Weight" )} )
				)
			)
		)
	) )
);

 

 

ALopez
Level III

Re: Lineup box disappears upon Save as Report MyReport.jrp

Hi @ih , thank you very much for your response, unfortunately your approach will not work because I am using scripts that call "functions" scripts and other ancillary scripts that process the data before generating the data table for the graphs.

I will follow up with support and add any solutions/comments I may get from them. 
  

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Lineup box disappears upon Save as Report MyReport.jrp

Hello @ALopez,

 

The .jrp file actually saves a script to create the the data table exactly as it is used in the graph (try changing the extension from .jrp to .jsl and open it up to see).  If a .jrp file servers your needs I believe you could copy and paste the same data table into a .jsl file with your pre-processing already done.  But, this is certainly more complex than just saving the report.

ALopez
Level III

Re: Lineup box disappears upon Save as Report MyReport.jrp

Hi @ih, You are right: anything that is more complex than saving the report is a No-No for the users that belong to the "what button do I press" crowd.

Cheers!