Hi All,
If I execute an Autopilot session from a command line ( for example "C:\Program Files (x86)\JetReports\AutoPilot.exe" /M UPDATE /I "MySourcepathname.xlsx" /O "MyJetDestinationFolder") the program returns control to the command line immediately and continues to execute in the background.
I'm need to write a routine which will take a list of jet reports in various locations and loop through the list refreshing each one, by creating the appropriate command line instruction string for autopilot and executing it. However I can't see a way to determine that autopilot has finished.
I can write a wait loop to see if the output has occurred, but I wondered if Autopilot can be made to return something to say that it has finished, which would be more elegant.
Any thoughts?
Regards,
Richard.
3 comments
-
Jet Reports Historic Posts Official comment Hi Richard,
You can use AutoPilot batch file execution for this. You create a master report with AutoPilot command lines in it to run all your other reports. You make a named range in this report which includes all the AutoPilot command lines and then specify it in the /X AutoPilot parameter of your main AutoPilot command line (or in the Jet Scheduler on the Output page in the Batch File Generation parameter). This should run each of the AutoPilot command lines one at a time (at least I'm pretty sure it will in recent versions of Jet; possibly not in older versions like v7 or 2009). Does this work for you?
Regards,
Hughes -
Jet Reports Historic Posts Hi Hughes,
I was out on Friday so I've only just picked up your post.
Thanks for that suggestion, I hadn't realized that was what /X did.
That might work for me, I'll need to have a think about it. The users will maintain a list of report names, together with the source and destination files, so I can maybe have a hidden sheet with the named range on, and calculated cells to create the command line. Not sure how to make the named range expand as they add reports though.
I'll experiment and see how I get on - and of course let the forum know.
Regards,
Rich -
Jet Reports Historic Posts Hi Hughes,
The batch file works exactly as you said, each command is executed in turn which is what I want.
I'll create the batch file programmatically in my solution, looping through the list as I was planning to, then execute the batch file as the final step.
Thanks for your help,
Richard