XG

Hi everyone,

I work an a report(named R_main) and in this report I use createExecInfo and execute to call another report(named R1). As below:

    var execInfo = reportcomponent.createExecInfo ( reportGUID, [model], lang, outputFormat, reportName);

    execInfo.setProperty("SAVE_TO_DOC_STORAGE","true");

    var result = reportcomponent.execute(execInfo);

But if I choose some specific models there will be an error by the function execute, and the error says in R1

var outFile = Context.createOutputObject( Context.getSelectedFormat( ), Context.getSelectedFile( ) );

could not use a full path.

Directly running R1 on the same models there is no error.

So I want to check the Context.getSelectedFile( ), when I run R_main and R1 is called.

However the createExecInfo doesn't allow the called report to show any Dialogs.

Could anyone give some help?

Thanks

 

by Kay Fischbach
Posted on Mon, 11/25/2019 - 15:16

Hi there,

you seem to be already aware of the existence of properties (at least there is one used in your code called "SAVE_TO_DOC_STORAGE"), you can use those to pass information back and forth from report to report.

In your R1 report you should comment out all the things that cause you trouble (with /* your code lines here */ ).

You can then use Context.setProperty("logProperty", Context.getSelectedFile()) in your R1 report.

You don't have to call the property logProperty, really any string will do - you just have to use the same string in both reports.

In your R_main report you can access this property with the object .execute(execInfo) returned (you called it result). You can use result.getProperty("logProperty") in your R_main report to retrieve the value you set for the "logProperty" property in your R1 report. Of course you can encapsulate that with a Dialogs.MsgBox(result.getProperty("logProperty")).

It's just really important that you comment out the troublesome stuff in your R1 report, otherwise your report execution will crash before .execute(execInfo) can even return something in your R_main report.

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