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

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
notsonimble
Level I

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");
}

Re: Automating reports using JMP

Thank you
mattf
Level V

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

Re: Automating reports using JMP

Thank you

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?
mattf
Level V

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;

->

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.
wjlevin
Level III

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.
wjlevin
Level III

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.