Automate creation of many similar reports personalized for recipientThis is a basic and admittedly vague question, but I just need a hint of where to begin to look for the answer.
I need to create a personalized performance report for each of the members of my department (about 25 people). Each person will see a bunch of graphs that contain information about their personal performance, superimposed on some aggregate departmental performance data. No individual sees individual data for anyone else. All the data comes from a table that is updated monthly with the statistics for the month.
I need to develop a workflow that allows me to automate as much as possible the creation of these reports. Ideally, I'd like to invoke a command and see all 25 personalized reports appear on my desktop or (even better) see all 25 of them emailed off to the intended recipients automatically, with a single button click or script command or whatever.
I can certainly create a single report and save the script, but what I don't want to do is go through the process of invoking that script 25 times every month.
Can somebody point me to a place in the documentation, or a tutorial, or an example of how someone has approached automating this kind of thing?
Re: Automate creation of many similar reports personalized for recipientThis is a modification of one script from chapter 8 of JSL Companion.
Re: Automate creation of many similar reports personalized for recipientThanks both!
Re: Automate creation of many similar reports personalized for recipientJMP has a Utility function called Mail. Below is a slightly modified script from the JMP Scripting Index found by selecting Help from the Main Menu and search for mail.
Many companies require email to be processed through a server exchange. Others require personally attaching items (not generated by a script). These are all security measures. If you try the example below, and it works, then try it with several employees.
If it does not work, you should contact your IT people. They might have a proprietary DLL (OS program), that can be used. It you hit a dead end, other options are to create a web drive where only you have write privileges and you can manage rights access. Then each employee can have their own page (subdirectory) that only you and the employee can see. Another alternative is to create the 25 reports with the month and user name and put a password on it where each employee has their own password, and, of course, you mange the passwords.
My final suggestion which might sound "preachy," but I would never atuo generate a report without review until it had been tested for consistency and accuracy.
So learn your environment, then follow Stephen Pearson's suggestion to learn how to script with For()
Names Default To Here( 1 );
Mail(
"test@example.com", //put your email address here
"Test JSL mail", //email title
"JMP is great.", //email text
"$SAMPLE_DATA/Big Class.jmp" //email attachment
);
Re: Automate creation of many similar reports personalized for recipientA local or global data filter is a good place to start. Create report for the aggregate, send to a journal. Next use the global data filter to limit to person 1. Send to journal. Repeat for all 25 people. To script you will need to learn about For loop, send to journal (save journal as word file, close journal) and how to filter one person at a time (get list of people, set row states, loop over people).