You are not logged in.
I have implemented a ReportExecutionNotificationHook script, defining the callback as follows:
def callback = [
notifyOfReportExecution : { report , parameterSet , user , outputFormat , configs -> },
notifyOfReportsSuccessfulExecution : { compiledReport , report , parameterSet , user , outputFormat , configs ->
re.reportExecution(true, report, user, parameterSet);
},
notifyOfReportsUnsuccessfulExecution : { e, report , parameterSet , user , outputFormat , configs ->
re.reportExecution(false, report, user, parameterSet);
},
doVetoReportExecution : { report , parameterSet , user , outputFormat , configs -> }
] as ReportExecutionNotificationHook
In the report object received, report.getKey() always returns null. The report does have a key defined though (I see this for the Berichtsdokumentation report too, which also has a key).
I tried using parameterSet.getParameterMap() to get the "_RS_REPORT_KEY" ParameterValue, but this too had a null value.
Is this expected behaviour? I would like to do some processing in my hook based on the key value - is there another way to get the key if the above 2 methods are returning null by design?
Last edited by awilcox (2015-03-23 18:36:50)
Offline
From the top of my head .. try
report.getBaseReport()
which should give you a report object that has the key. As an explanation: ReportServer always creates a report variant which is then executed and the key is only stored on the base report.
Arno
Offline
Sorry, I can't seem to find a getBaseReport() method on Report.
Offline
The object that you should get there should implement the ReportVariant interface. For example BirtReportVariant.
Offline
Oh yes, got it now. Thanks very much!
Offline
Hi,
To sum up, I can't get report variant key from object report at all, can I?
report.getBaseReport.getKey() gives me a key of basic report.
report.getKey() doesn't give me key of variant report (the key name of variant report is filed in administration and I even use it in inline report).
Is there really no option to take key of variant report from object Report?
Last edited by Patryx (2019-04-18 06:08:55)
Offline