cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
voy-voy
Level II

open multiple Journals

Hello,

 

I look for a script, where I can open multiple Journals, and ad to different points in script an object to the chosen Journal.

 

With my script the diagrams are always in the last opened Journal, not in the Journal I choose.

 

Could someone help me to solve the problem?

 

dt = Open("C:\Program Files\SAS\JMP\17\Samples\Data\CrimeData.jmp");

///Journale Erstellen
J1 = New Window( "xxx1", <<Journal );
J2 = New Window( "xxx2", <<Journal );
J3 = New Window( "xxx3", <<Journal );



df = dt << Data Filter(
	Speicherort( {646, 247} ),
	Modus( Anzeigen( 1 ), Einschließen( 1 ) ),
	Filter hinzufügen( Spalten( :Year ), Where( :Year >= 2000 ) )
); ///Last 20 Yeras


Dia1 = Bivariat( Y( :Property Rate ), X( :Year ) );


Dia2 = Bivariat( Y( :Robbery Rate ), X( :Year ) );


Dia3 = Bivariat( Y( :Rape ), X( :Year ) );



J1 = current journal();
Dia1 << journal;

J2 = current journal();
Dia2 << journal;

J3 = current journal();
Dia3 << journal;


df << Close;
dt << Clear Selection();

df2 = dt << Data Filter(
	Speicherort( {646, 247} ),
	Modus( Anzeigen( 1 ), Einschließen( 1 ) ),
	Filter hinzufügen( Spalten( :Year ), Where( :Year >= 2005 ) )
); //////Last 10 Yeras

Dia1a = Bivariat( Y( :Property Rate ), X( :Year ) );


Dia2a = Bivariat( Y( :Robbery Rate ), X( :Year ) );


Dia3a = Bivariat( Y( :Rape ), X( :Year ) );


J1 = current journal();
Dia1a << journal;

J2 = current journal();
Dia2a << journal;

J3 = current journal();
Dia3a << journal;
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: open multiple Journals

I think this is the most straight forward way to handle this

dt = Open("$SAMPLE_DATA\CrimeData.jmp");

///Jornale Erstellen, damit die Diagramme direkt wieder eingefügt werden könenn
J1 = New Window( "xxx1", <<Journal, vlb31 = vlistbox() );
J2 = New Window( "xxx2", <<Journal, vlb32 = vlistbox() );
J3 = New Window( "xxx3", <<Journal, vlb33 = vlistbox() );



df = dt << Data Filter(
	Speicherort( {646, 247} ),
	Modus( Anzeigen( 1 ), Einschließen( 1 ) ),
	Filter hinzufügen( Spalten( :Year ), Where( :Year >= 2000 ) )
); ///Last 20 Yeras


Dia1 = Bivariate( Y( :Property Rate ), X( :Year ) );


Dia2 = Bivariate( Y( :Robbery Rate ), X( :Year ) );


Dia3 = Bivariate( Y( :Rape ), X( :Year ) );

vlb31 << append(report(dia1));
vlb32 << append(report(dia2));
vlb33 << append(report(dia3));

df << Close;
dt << Clear Selection();

df2 = dt << Data Filter(
	Speicherort( {646, 247} ),
	Modus( Anzeigen( 1 ), Einschließen( 1 ) ),
	Filter hinzufügen( Spalten( :Year ), Where( :Year >= 2005 ) )
); //////Last 10 Yeras

Dia1a = Bivariate( Y( :Property Rate ), X( :Year ) );


Dia2a = Bivariate( Y( :Robbery Rate ), X( :Year ) );


Dia3a = Bivariate( Y( :Rape ), X( :Year ) );


vlb31 << append(report(dia1a));
vlb32 << append(report(dia2a));
vlb33 << append(report(dia3a));
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: open multiple Journals

I think this is the most straight forward way to handle this

dt = Open("$SAMPLE_DATA\CrimeData.jmp");

///Jornale Erstellen, damit die Diagramme direkt wieder eingefügt werden könenn
J1 = New Window( "xxx1", <<Journal, vlb31 = vlistbox() );
J2 = New Window( "xxx2", <<Journal, vlb32 = vlistbox() );
J3 = New Window( "xxx3", <<Journal, vlb33 = vlistbox() );



df = dt << Data Filter(
	Speicherort( {646, 247} ),
	Modus( Anzeigen( 1 ), Einschließen( 1 ) ),
	Filter hinzufügen( Spalten( :Year ), Where( :Year >= 2000 ) )
); ///Last 20 Yeras


Dia1 = Bivariate( Y( :Property Rate ), X( :Year ) );


Dia2 = Bivariate( Y( :Robbery Rate ), X( :Year ) );


Dia3 = Bivariate( Y( :Rape ), X( :Year ) );

vlb31 << append(report(dia1));
vlb32 << append(report(dia2));
vlb33 << append(report(dia3));

df << Close;
dt << Clear Selection();

df2 = dt << Data Filter(
	Speicherort( {646, 247} ),
	Modus( Anzeigen( 1 ), Einschließen( 1 ) ),
	Filter hinzufügen( Spalten( :Year ), Where( :Year >= 2005 ) )
); //////Last 10 Yeras

Dia1a = Bivariate( Y( :Property Rate ), X( :Year ) );


Dia2a = Bivariate( Y( :Robbery Rate ), X( :Year ) );


Dia3a = Bivariate( Y( :Rape ), X( :Year ) );


vlb31 << append(report(dia1a));
vlb32 << append(report(dia2a));
vlb33 << append(report(dia3a));
Jim
voy-voy
Level II

Re: open multiple Journals

Thank you, it works perfectly