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
Jakob
Level II

How do I Create a report header with JSL

Hi All

I'm looking to create header for my JMP reports with information like this

Jakob_0-1587464567015.png

I have all the information in my data table, but can´t get it to any journal or report, please guide me to the code

 

is it possible to get user input during the script execution like typing user name in a dialog box ?

I managed to get accept limits into the table as variables, using this dialog

Jakob_1-1587464920434.png

but can´t get them into the report

 

Thanks

 

Jakob

3 REPLIES 3
Jakob
Level II

Re: How do I Create a report header with JSL

Please help 

txnelson
Super User

Re: How do I Create a report header with JSL

Run the below script.  It has a simple input screen, it then creates a header and a simple report output.  Study the script and then you should be able to go develop your own version

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );

userInput = New Window( "Enter User Data",
	<<modal,
	V List Box(
		Text Box( "Insert Accept Limits" ),
		Spacer Box( size( 1, 15 ) ),
		H List Box(
			Text Box( "Enter Name for report: " ),
			nameTB = Text Edit Box( "????",
				<<set width( 200 ),
				<<set script( reportName = nameTB << get text )
			), 

		),
		Spacer Box( size( 1, 15 ) ),
		H List Box(
			Text Box( "Enter Ppk Accept Limit: " ),
			ppkNum = Number Edit Box(
				0,
				8,
				<<SetFunction(
					Function( {this}, /* put my value into my sibling's display */
						(ppkValue = ppkNum << get)
					)
				)
			)
		),
		Spacer Box( size( 1, 15 ) ),
		H List Box(
			Text Box( "Enter Cc Accept Limit: " ),
			ccNum = Number Edit Box(
				0,
				8,
				<<SetFunction(
					Function( {this}, /* put my value into my sibling's display */
						(ccValue = ccNum << get)
					)
				)
			)
		)
	)
);

// Write to the log
Show( reportName, ppkValue, ccValue );

dNumber = "512-4447-AM";
rIDNumber = 18;
nameAndDate = Get Environment Variable( "USERNAME" ) || ", " || Format( Today(), "m/d/y" );

// Create the output with header
nw = New Window( "My Output", 
	
	Border Box( top( 10 ), Left( 10 ), Right( 10 ), bottom( 10 ), sides( 15 ),
		V List Box(
			Spacer Box( size( 1, 10 ) ),
			Text Box( "Drawing Number " || dNumber ),
			Spacer Box( size( 1, 10 ) ),
			Text Box( "Report ID Number " || Char( rIDNumber ) ),
			Spacer Box( size( 1, 10 ) ),
			Text Box( "Name & Date " || nameAndDate ), 
			
		)
	),
	bivariate( x( npn1 ), y( pnp1 ) )
);
Jim
Jakob
Level II

Re: How do I Create a report header with JSL

Hi Jim
Thanks a lot, it looks like something I can use to build from
All the Best
Jakob