BookmarkSubscribe
Choose Language Hide Translation Bar
Highlighted
kuannygoh
Occasional Contributor

table box able to plot in report but when\ save it in interactive html , the table dissapear

Hi all , 

I have a problem here , my table box able to plot in report but when i save it in interactive html , the table dissapear

 

Source code 

Data Table To Table Box = Function({dt},{Default Local},
	
	tb = Table Box();
	For (i=1,i<=NCols(dt),i++,
		col = Column(dt,i);
		colName = col << Get Name;
		lstValues = col << Get Values;
		type = col << Get Data Type;
		If (type=="Character",
			tb << Append(
				String Col Box(colName,lstValues)
			)
		,
			tb << Append(
				Number Col Box(colName,lstValues)
			)
		);
	);
	Return(tb);
	
);




New Window( "Example",
	nwbb = Tab Box(
		Tab Page Box(
			"Step 1",
			TB = Tab Box(
				Tab Page Box(
					"Summary",
					Table Box(
						Data Table To Table Box(dt)
					)
				),
				Tab Page Box(
					"Pareto Chart",
					ob1 = Outline Box( "Pareto Chart",
						dt << Distribution( Column( :Height, :Weight ), By( :sex ) )
					)
				)
				
			)
		)
	)
);


table summary exist.PNGtable not show.PNG

 

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Jeff_Perkinson
Community Manager Community Manager

Re: table box able to plot in report but when\ save it in interactive html , the table dissapear

Due respect to Jim, but interactive HTML will handle user-generated, custom Table Boxes. The problem here is that you've got a Table Box within a Table Box in your construction. Your function "Data Table To Table Box" returns a table box and then you wrap that in a Table Box():

 

Table Box( Data Table To Table Box(dt) )

Just remove the outer Table Box() and your code works and can be saved as interactive HTML.

 

 

 

 

 

-Jeff
2 REPLIES 2
txnelson
Super User

Re: table box able to plot in report but when\ save it in interactive html , the table dissapear

Currently, JMP does not support user developed Table Boxes when saving to Interactive HTML.  I suggest that you use a New Data Box to allow it to be saved as Interactive HTML

See Jeff Perkinson's comment below

 

Names Default To Here( 1 );
dt = current data table();

New Window( "Example",
	nwbb = Tab Box(
		Tab Page Box(
			"Step 1",
			TB = Tab Box(
				Tab Page Box( "Summary", dt << new data box() ),
				Tab Page Box(
					"Pareto Chart",
					ob1 = Outline Box( "Pareto Chart",
						dt << Distribution( Column( :Height, :Weight ), By( :sex ) )
					)
				)
				
			)
		)
	)
);

HTML.PNG

 

Jim
Jeff_Perkinson
Community Manager Community Manager

Re: table box able to plot in report but when\ save it in interactive html , the table dissapear

Due respect to Jim, but interactive HTML will handle user-generated, custom Table Boxes. The problem here is that you've got a Table Box within a Table Box in your construction. Your function "Data Table To Table Box" returns a table box and then you wrap that in a Table Box():

 

Table Box( Data Table To Table Box(dt) )

Just remove the outer Table Box() and your code works and can be saved as interactive HTML.

 

 

 

 

 

-Jeff