- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Automating reports using JMP
Any suggestions about how I could automate generating 40 - 50 reports of data that I have analysed in JMP on a weekly basis? Cutting and pasting would be too slow.
9 REPLIES 9
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
Not knowing where you are starting from ... Assuming you already have JSL scripts.
I do this regularly by first generating jsl scripts for the reports and then executing a PERL script to run on some schedule. The PERL code for starting JMP and executing a jsl script looks like this...
runJMP();
sub runJMP{
#----------------------------------------------------#
# RUN JMP ? #
#----------------------------------------------------#
print "\nProcessing JSL file... (put in your JSL script file name here)\n";
unless($jmp = Win32::OLE -> new("JMP.Application")){
print "\nError opening JMP. Aborting. to exit.";
;
#~ exit; # this line can be used to exit/abort if you can't start JMP
}
$jmp -> {Visible} = 'true';
$jmp -> RunJSLFile("yourfile.jsl");
}
I do this regularly by first generating jsl scripts for the reports and then executing a PERL script to run on some schedule. The PERL code for starting JMP and executing a jsl script looks like this...
runJMP();
sub runJMP{
#----------------------------------------------------#
# RUN JMP ? #
#----------------------------------------------------#
print "\nProcessing JSL file... (put in your JSL script file name here)\n";
unless($jmp = Win32::OLE -> new("JMP.Application")){
print "\nError opening JMP. Aborting.
#~ exit; # this line can be used to exit/abort if you can't start JMP
}
$jmp -> {Visible} = 'true';
$jmp -> RunJSLFile("yourfile.jsl");
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
Automation via MS COM is a great way to go - choose your favorite scripting tool and away you go.
See:
http://www.jmp.com/software/whitepapers/pdfs/automating_jmp_wp.pdf
and
http://www.nesug.org/Proceedings/nesug09/ap/ap09.pdf
Best,
-Matt
See:
http://www.jmp.com/software/whitepapers/pdfs/automating_jmp_wp.pdf
and
http://www.nesug.org/Proceedings/nesug09/ap/ap09.pdf
Best,
-Matt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
It be ideal if the reports can be 'exported' automatically into Word or Excel. Would either of these ways achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
That is the beauty of COM scripting your JMP application from outside of JMP.
One can mix and match and tie PC apps together. Just as one can script JMP from Perl/TCL/Python/etc. One can also script Word, Excel, PowerPoint, etc as well.
Best,
-Matt
<-
#!c:\Perl\bin\perl.exe
use Win32::OLE;
# http://support.microsoft.com/kb/214797
print "#######################################################","\n";
# get already active Excel application or open new session
# Start JMP and make it visible
my $jmp = Win32::OLE->new('JMP.Application');
$jmp->{Visible} = 1;
# __ Open existing data table
my $doc = $jmp->OpenDocument("C:\\temp\\Big class.jmp");
$jmp->{Visible}=1;
#__ the classic
my $dt = $jmp->NewDataTable("Hello World.jmp");
my $col = $dt->NewColumn(Col1, 1, 0, 8);
#__ You must add rows before populating the table with data
$dt->AddRows(20, 0);
#__ Set Cell values to increments of 1
for (my $i=1; $i<=20; $i+=1)
{
$col->SetCellVal($i, $i);
}
my $col2 = $dt->NewColumn(Col2, 1, 0, 8);
for (my $i=1; $i<=20; $i+=1)
{
$col2->SetCellVal($i,$i + 5);
}
my $col3 =$dt->NewColumn(Col3, 1, 0, 8);
$col3->AddFormula("Col1 + Col2");
$dt->{Visible} = 1;
# return those JMP calculated values back to perl
my $x = $col3->GetDataVector;
# Start Excel and make it visible
my $xlApp = Win32::OLE->new('Excel.Application');
$xlApp->{Visible} = 1;
# Create a new workbook
my $xlBook = $xlApp->Workbooks->Add;
# Write all the data at once...
my $rng = $xlBook->ActiveSheet->Range("A1:C7");
$rng->{Value} = $x;
->
One can mix and match and tie PC apps together. Just as one can script JMP from Perl/TCL/Python/etc. One can also script Word, Excel, PowerPoint, etc as well.
Best,
-Matt
<-
#!c:\Perl\bin\perl.exe
use Win32::OLE;
# http://support.microsoft.com/kb/214797
print "#######################################################","\n";
# get already active Excel application or open new session
# Start JMP and make it visible
my $jmp = Win32::OLE->new('JMP.Application');
$jmp->{Visible} = 1;
# __ Open existing data table
my $doc = $jmp->OpenDocument("C:\\temp\\Big class.jmp");
$jmp->{Visible}=1;
#__ the classic
my $dt = $jmp->NewDataTable("Hello World.jmp");
my $col = $dt->NewColumn(Col1, 1, 0, 8);
#__ You must add rows before populating the table with data
$dt->AddRows(20, 0);
#__ Set Cell values to increments of 1
for (my $i=1; $i<=20; $i+=1)
{
$col->SetCellVal($i, $i);
}
my $col2 = $dt->NewColumn(Col2, 1, 0, 8);
for (my $i=1; $i<=20; $i+=1)
{
$col2->SetCellVal($i,$i + 5);
}
my $col3 =$dt->NewColumn(Col3, 1, 0, 8);
$col3->AddFormula("Col1 + Col2");
$dt->{Visible} = 1;
# return those JMP calculated values back to perl
my $x = $col3->GetDataVector;
# Start Excel and make it visible
my $xlApp = Win32::OLE->new('Excel.Application');
$xlApp->{Visible} = 1;
# Create a new workbook
my $xlBook = $xlApp->Workbooks->Add;
# Write all the data at once...
my $rng = $xlBook->ActiveSheet->Range("A1:C7");
$rng->{Value} = $x;
->
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
Hi,
I try to use 'save PDF' to automatically export reports / journals to a .pdf file. I currently found no documentation on the parameters of this function. What I miss is all that is available when saving to pdf-format using to SaveAs menu item, expecially 'Paper Size' and 'Page Scale'.
Is there a generally an overview in ALL available parameters per function? I had a similar problem when strying to stack columns because 'Stack By Row' was actually hidden in the JSL documentation - which is still poor in JMP 9.
I try to use 'save PDF' to automatically export reports / journals to a .pdf file. I currently found no documentation on the parameters of this function. What I miss is all that is available when saving to pdf-format using to SaveAs menu item, expecially 'Paper Size' and 'Page Scale'.
Is there a generally an overview in ALL available parameters per function? I had a similar problem when strying to stack columns because 'Stack By Row' was actually hidden in the JSL documentation - which is still poor in JMP 9.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
We are about to release a script (for JMP 8 users) and an addin (for JMP 9) that exports to PDF. If you want to read of the announcement - please sign up to our announcement list at:
http://ethreemail.com/subscribe?g=6ed2a67d
You can unsubscribe at any time and your email address will NOT be given to any third parties or used for any other purpose.
Watch for a Powerpoint export as well.
http://ethreemail.com/subscribe?g=6ed2a67d
You can unsubscribe at any time and your email address will NOT be given to any third parties or used for any other purpose.
Watch for a Powerpoint export as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Automating reports using JMP
I should add - I'll put download information on this thread as well - but I won't be able to keep you up to date with it - hence why I'm suggesting that if you're interested, get on our Announce list.