Hi,
I have several different reports that I want to run the same javascript method because they basically all do the same thing. There is one difference though depending on which report they run. I cannot find a way in my javascript client method to figure out which report was run in order to handle them slightly differently.
Any help figuring out which report I ran would be greatly appreciated. I've tried adding content to the Report Query without luck.
We're running 8.1.1 currently (planning on upgrading to 9.1 as soon as possible)
Hi.
Unfortunately, there are no standard API to retrieve a running report name. But I used the code below to get the report name in its javascript method (it works in 9.1):
var reportName;
try{ var c = arguments.callee.caller; var cntr = 0 while (c && c.toString().indexOf("function Aras_runClientReport")!=0 && cntr<10) { c = c.caller; } if (c && c.toString().indexOf("function Aras_runClientReport")==0) { reportName = top.aras.getItemProperty(c.arguments[0], "name"); }}catch (ex){ reportName = undefined;}if (!reportName){ top.aras.AlertError("Internal Exception: Cannot define selected report name."); return "";}