Profile picture for user egambrell

Hi -

I already have a report that pulls the scheduled report results and generates an Excel file on a shared drive:

        var reportScheduler = Context.getComponent("ReportScheduler");

        var aByteArrayResult = reportScheduler.getDecryptedScheduleResult("scheduledReportGUID", "username", "password", false);

        var aSelectedFile = reportScheduler.getZipEntries(aByteArrayResult);

        var aByteArrayXLSX = null;

        for (var i in aSelectedFile) {

            if (aSelectedFile[i].getName().equals("OutputFile.xlsx")) {

                aByteArrayXLSX = aSelectedFile[i].getData();

                break;

            }

        }

        var outputFile = new java.io.File(filePath + "\\OutputFile.xlsx");

        var fop = new java.io.FileOutputStream(outputFile);

        if (!outputFile.exists()) {

            outputFile.createNewFile();

        }

        fop.write(aByteArrayXLSX);

        fop.flush();

        fop.close();

This is working great for a single database, but I need to be able to set this up for multiple databases nightly. Is there a way to get to the scheduled report without needing the GUID? Since the scheduled report GUID is completely different from the report GUID, I need to hard code in the scheduled report GUID within the report.

This creates a problem - if I have to get the scheduled report GUID via the database names, they could change and it could break. And if for some reason the scheduled report gets removed and set up a 2nd time, it will also break.

by Robert Goldenbaum
Badge for 'Question Solver' achievement
Posted on Tue, 03/07/2017 - 09:13

HI Ellen,

sorry, don't know about the scheduled report without GUID, but you could use an XML file with the GUIDs in it as a work around. Then you just have to add the GUID there without changing your script...

BR Robert

0
by Ellen Gambrell Pelletier Author
Posted on Mon, 03/13/2017 - 17:18

In reply to by rgoldenbaum

Hi Robert - It is another option, but it still leads to the same problem. The idea is for the report to import content and then export out an update afterward. I need my end users to be able to schedule the report and not be required to grab the GUID and plug it in anywhere. 

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock