cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
danf
Level III

sending commands to reports

 I would like to get some help on how to send commands to elements within a platform report, I've done it before with the help of Xan Gregg's  suggestion. I've done it myself in another case when I happened to get the correct code but I can find nothing that really explains how to do it every time. I have a report coming out of the Time Series platform and I want to send the report a Save Columns command in the Outline Box where the first model appears. This Outline box has a drop down window. I have tried Update Element() as well as Save Columns(1) and Save columns. My guess is that I am not identifying  the Outline box properly and I cannot find information on how to do that so I would greatly appreciate some discussion on how to get the proper element identified every time. Attached is a screen shot of the report window and below is my JSL attempts. Any help is greatly appreciated.

dt = Current Data Table();
 
ts = dt << Time Series(
	Y( :"Forming Line-Forming Line Speed"n ),
	Input List( :Mat Length ),
	Variogram( 1 ),
	Transfer Function(
		Order( 0, 1, 6 ),
		Seasonal( 0, 0, 0, 1 ),
		:Mat Length( Order( 0, 1, 0 ), Seasonal( 0, 0, 0, 1 ), Lag( 0 ) ),
		Prediction Interval( 0.85 ),
		Number of Forecast Periods( 6 )
	),
	Model Comparison Report( Select Reports( [1] ), Select Graphs( Empty() ) ),
	Input Series( :Mat Length, Variogram( 0 ) ),
	SendToReport(
		Dispatch(
			{"Time Series Forming Line-Forming Line Speed", "Model Comparison"},
			"",
			ScrollBox,
			{Background Color( {246, 250, 254} )}
		),
		Dispatch(
			{"Time Series Forming Line-Forming Line Speed", "Transfer Function Model (1)",
			"Interactive Forecasting"},
			"Time Series",
			FrameBox,
			{DispatchSeg( CustomStreamSeg( 2 ), {Line Color( "Red" )} ),
			DispatchSeg( CustomStreamSeg( 3 ), {Line Color( "Blue" )} ),
			DispatchSeg( CustomStreamSeg( 4 ), {Line Color( "Blue" )} ),
			DispatchSeg( CustomStreamSeg( 5 ), {Line Color( "Blue" )} )}
		)
	)
);
tsr = Report( ts );
tsb = tsr( Outline Box( "Transfer Function Model (1)" ) );
tsb << Save Columns;

 

// tsr << Update Element(1, 1, 1, 1, 8, 1, {Save Columns}));

// tsr << Update Element(1, 1, 3, {Save Columns}));
;
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: sending commands to reports

Below are few options which might work for you (or at least maybe give an idea what to do)

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Time Series/SeriesJ.jmp");
obj = dt << Time Series(Y(:Output CO2), Input List(:Input Gas Rate));
obj << Transfer Function(
	Order(2, 0, 0),
	Seasonal(0, 0, 0, 0),
	:Input Gas Rate(Order(2, 0, 2), Seasonal(0, 0, 0, 0), Lag(3))
);
obj2 = obj << Transfer Function(
	Order(2, 0, 0),
	Seasonal(0, 0, 0, 0),
	:Input Gas Rate(Order(2, 0, 2), Seasonal(0, 0, 0, 0), Lag(3)),
	No Intercept(1),
	Alternative Parameterization(1),
	Confidence Intervals(0.99),
	Number of Forecast Periods(10)
);

dt1 = obj2 << Save Columns; // using second reference

// using timeseries reference
dt2 = (Report(obj)[OutlineBox("Transfer Function Model (1)")] << get scriptable object) << Save Columns;

show(dt1, dt2);

 

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: sending commands to reports

Below are few options which might work for you (or at least maybe give an idea what to do)

Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Time Series/SeriesJ.jmp");
obj = dt << Time Series(Y(:Output CO2), Input List(:Input Gas Rate));
obj << Transfer Function(
	Order(2, 0, 0),
	Seasonal(0, 0, 0, 0),
	:Input Gas Rate(Order(2, 0, 2), Seasonal(0, 0, 0, 0), Lag(3))
);
obj2 = obj << Transfer Function(
	Order(2, 0, 0),
	Seasonal(0, 0, 0, 0),
	:Input Gas Rate(Order(2, 0, 2), Seasonal(0, 0, 0, 0), Lag(3)),
	No Intercept(1),
	Alternative Parameterization(1),
	Confidence Intervals(0.99),
	Number of Forecast Periods(10)
);

dt1 = obj2 << Save Columns; // using second reference

// using timeseries reference
dt2 = (Report(obj)[OutlineBox("Transfer Function Model (1)")] << get scriptable object) << Save Columns;

show(dt1, dt2);

 

-Jarmo
danf
Level III

Re: sending commands to reports

Thank you for your help! That works! I really appreciate it!

Dan