In SR 9 we were given the ability to schedule reports. By default were is the output of these reports saved?
The result is stored internally and can only be accessed by the Business Architect client or by using the report:
var zippedByteContent = Context.getComponent("ReportScheduler").getDecryptedScheduleResult(String sScheduleGUID, String sUser, String sPassword, false) var aResultFiles = Context.getComponent("ReportScheduler").getZipEntries(zippedByteContent)
(see ARIS Script help)
Hello Torsten,
How can I access the result through ABA? When I navigate in Explorer to the "Scheduled reports" tab, select a report which has run and click "Display result", a dialog opens for me to select a file. However the file is not available on the file system, as I understand your reply? So how do I access the result?
Thanks in advance.
Hi Torsten,
When I log on to the server where ARIS is installed and run the report interactively, it saves to the default ARIS 7.1 folder under My Documents. However when run as a scheduled report, it does not save to this location. Or any other location on the disk drive, as far as I can tell (except for an encrypted file sitting in the install directory under "templates\scriptservice\scheduler"). As far as I can see, there also is no option to specify file location when configuring the report schedule. Do I need to specify the exact folder where the report is to be saved inside the report script for it to work with the scheduler? Or am I missing a UI configuration option somewhere?
Thanks and have a nice weekend!
Hi Troels!
If you run a report interactively, you specify the location, where the report is stored on your client, in the assistant when starting the report.
Scheduled reports keep their results internally (you are right, the location in the current release is templates/scriptservice/scheduler), so no-one who is not allowed to see database content can access it. Only the user who has created the schedluling is allowed to read the result, so only this user can access and save the result on the client.
If you want to write a report, which stores its results somewhere on the server, allowing everyone to read it, you are free to do so in the report implementation, but this is not the default way a report provides its results.
BR,
Torsten
Hi Torsten,
Thanks for your reply. However, I am still at a loss in how to display the result of the scheduled report. I have logged on to the database with the the admin account which was used to create the report schedule. In Explorer, I go to the Scheduled Reports for the relevant database and select the scheduled report. Then I click "Display result". Now a dialog box opens for me to browse to and select the file I want to display. I am only allowed to select .XLS files (which is the format output by the report, when run interactively), so I cannot select the encrypted file stored under "templates/scriptservice/scheduler".
You mention that "Only the user who has created the schedluling is allowed to read the result, so only this user can access and save the result on the client."
How do I do that???
Thanks and regards,
Troels
Hi Troels,
you cannot access "the encrypted file", because this is internal data only. The result of the report is an XLS file so you are prompted where to store this result locally.
If you need scriptable access to the scheduler results, there is a report API extension, which can be used to access scheduler results:
var reportScheduler = Context.getComponent("ReportScheduler")
provides the following methods:
var aByteArrayResult = reportScheduler.getDecryptedScheduleResult ( String sScheduleGUID, String sUser, String sPassword, boolean bIsPwdEncrypted ) var aSelectedFile = reportScheduler.getZipEntries ( aByteArrayResult )
BR,
Torsten
Hi Torsten
I have a question, a little late, I have the result of the report, like you do in the example. Now I want to save the report result in a folder in the server, can this be done?
I have another question regarding the scriptrunner. II have the 9.8 ver of Aris, and there is no scriptrunner inside the instalation server. If I want to use it, I need to create one? This is not very clear to me
Hope you can help me
Regards
Hi Diego,
you can save the result in a folder on the server using the standard java classes (e.g. FileOutputStream) for file operations (of course this is not possible / bocked in a public cloud scenario).
The script runner in fact is a client so it comes with the client installation. A server-side scriptrunner would not make much sense in ARIS 9 any more because "normal users" normally do not have access to the server's file system.
BR, Torsten
Hi Torsten,
How do I get the SheduleGUID, username, password and password encrypted values from a report schedule, in otherwords, I want to programatically loop through the scheduled reports and save the output to a folder. In order to need that I need to obtain these values from the sheduled reports.
Ciska