Choose Language Hide Translation Bar
Mark_ON
Occasional Contributor

Generating a table of contents page

I'm generating some scripts for semiconductor characterization data analysis. Each report contains around 300 tests. Each test is assigned an outline box which then has a number of charts and data inside it. I want to generate a table of contents at the beginning of the report so people can click into the tests they care about. Is there a way to generate a clickable link which will take you to the appropriate outline box in the report? I haven't found anything here in the forums. For my own analysis and presentations I'll be using jmp itself, but I'll also be publishing to html for other users to look at the data on their own if that makes a difference.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Generating a table of contents page

You can use the "Invisible" parameter in open() and rw << showWindow(0) when you create report windows.

Here's an example:

CharDt = open("$sample_data/Big Class.jmp", "Invisible");
testlist = CharDt << get column names ("Continuous", "string");

webreport = New Web Report();

For( k = 1, k <= N Items(testlist), k++,
	
	rw = New Window(Char(Eval(testlist[k])));
	rw << Show Window(0);
	rw << Append(ob = Outline Box (Eval(testlist[k]),		
			//V List Box(
				H List Box( Distribution(
						Continuous Distribution( Column((Eval(testlist[k] ) ),
					)																																						
				);																
			//);		
		));
	));
	
	webreport << Add Report( ob );		
);

I commented out the V List Box() since it's not needed for a single report like distribution, but you may need it if you are laying out multiple graphs within each report window. 

View solution in original post

0 Kudos
7 REPLIES 7
txnelson
Super User

Re: Generating a table of contents page

I am not aware of the ability to scroll to a specific outline box within a journal, however, I can envision clicking on a table of contents entry, and either popping up a new window with a copy of the outline box displayed in the new window, or else, the action of clicking on table of contents entry, closes all outline boxes, and then expands only the outline box for the specified entry clicked on.

Jim
0 Kudos

Re: Generating a table of contents page

For the presentations in JMP, if you were willing to create a Journal with all the outline boxes initially closed, they could serve as your table of contents.

 

Although this could probably be published as-is to Interactive HTML, I'd like to offer a different solution for publishing to Interactive HTML with a table of contents. On the web,  creating a very long (300 test) web page may not be desirable because it may have trouble loading in the browser, especially if viewed on a mobile device.

 

If instead of creating one long report with 300 graphs, you created 300 separate graphs, each in its own window, you can publish them to separate html files and create the table of contents using the following JSL commands:

  1. webReport = New Web Report()
  2. webReport << Add Report(reportWindow) [300 times] or webReport <<Add Reports(reportWindows)
  3. webReport << Index() to customize the table of contents
  4. file = webReport << Save(<folder>). 

I would start with looking at examples in the Scripting Index for each of these functions.

 

If you want to explore how this works in the GUI before writing any JSL code, look for 'Create Web Report ... ' under the View menu in JMP 13 or 'Publish' under the File menu in JMP 14.

 

I hope this helps.

~John

 

Mark_ON
Occasional Contributor

Re: Generating a table of contents page

Thanks guys. Starting with all windows closed is the sort of completely obviously solution I never would have thought of and I've set my script to do that for now. John I'll experiment with the web report function when I have time. If I come up with anything useful I'll post it here in the future. The other option I've thought of (less desirable) is to post-process the html itself to create a link table at the beginning of the report, but that would require some additional learning with an HTML editor.

0 Kudos

Re: Generating a table of contents page

You're welcome.

Please let me know if there's anything else I can do to help.

0 Kudos
Mark_ON
Occasional Contributor

Re: Generating a table of contents page

Ok yeah, web report() and index() will work great. Couple questions after my code sample:

 

// construct report window
testlist = CharDt << get column names ("Continuous", "string");

webreport = New Web Report();

For( k = 1, k <= N Items(testlist), k++,
	
		rw = New Window(Char(Eval(testlist[k])));
		rw << Append(ob = Outline Box (Eval(testlist[k]),		
			V List Box(
				H List Box(
                 			[construction of various charts and tables]																																						
				);																
			);		
		));
		
		webreport << Add Report( ob );		
	);
);	

webreport << Index(
	Title( "Characterization Report" ),
	Description( "Characterization Report" ),
	Font( "Arial Narrow", "Bold" ),
	Theme( "Black" ),
	Style( "Grid" )
);

file = webreport << Save( "$TEMP" );
If( !Is Empty( file ),
	Web( file )
);

 

Is there a way to prevent the windows from opening so I don't spam my screen with 300 of them? Or alternatively is there a (perhaps better) container I can use other than "new window" that I can pass in as the web report object which will never show up on the screen in the first place? I tried to pass in the outline box but it didn't accept that, and I didn't experiment with anything else.

 

0 Kudos

Re: Generating a table of contents page

You can use the "Invisible" parameter in open() and rw << showWindow(0) when you create report windows.

Here's an example:

CharDt = open("$sample_data/Big Class.jmp", "Invisible");
testlist = CharDt << get column names ("Continuous", "string");

webreport = New Web Report();

For( k = 1, k <= N Items(testlist), k++,
	
	rw = New Window(Char(Eval(testlist[k])));
	rw << Show Window(0);
	rw << Append(ob = Outline Box (Eval(testlist[k]),		
			//V List Box(
				H List Box( Distribution(
						Continuous Distribution( Column((Eval(testlist[k] ) ),
					)																																						
				);																
			//);		
		));
	));
	
	webreport << Add Report( ob );		
);

I commented out the V List Box() since it's not needed for a single report like distribution, but you may need it if you are laying out multiple graphs within each report window. 

View solution in original post

0 Kudos
Mark_ON
Occasional Contributor

Re: Generating a table of contents page

Thank John, that works and covers all my questions.

 

The V list and H list are part of the full code which I didn't copy in, there are 4 charts per test and 2 tables so there is bit of layout code involved.