Question
JPMC
IN
Last activity: 3 Dec 2015 10:57 EST
Upon invoking pxShowReport from an activity, Report definition is not opening in new pop up
Hi Team,
I have invoked Rule-Obj-Report-Definition.pxShowReport with the corresponding parameters from a wrapper activity , I see report definition is being invoked in the back end but it is not showing up in a new window. Wrapper activity is placed in Button event on click- Run activity.
When executing the activity individually it is showing up the report in a new window, but when clicked the button it is not showing up the report definition in new pop up window.
Thanks
Sri
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
The following resolution notes were included in the SR:
Include a "Run Script" on click of a button and call the function "callActivity"
<script language="javascript">
function callActivity(){
var oSafeURL = SafeURL_createFromURL(pega.u.d.url);
- oSafeURL.put("pyActivity", "");
var oWnd = pega.desktop.support.getDesktopWindow();
if (!oWnd) {
oWnd = window;
}
var strURL = oSafeURL.toURL();
- oWnd.pega.util.Connect.asyncRequest('GET', strURL);
//Please check your request and response in fiddler
if(<the property value that we are setting in the activity is true>)
{
- pega.openUrlInModal.showModalDialog(urlToOpen, window, "dialogWidth:300px; dialogHeight:100px; status:no; center:yes");
}
}
</script>
Pegasystems Inc.
IN
Hi
Which PEGA version you are on ?
JPMC
IN
Hi we are using 7.1.7
Pegasystems Inc.
IN
JPMC
IN
yes I have used it , it is working.
But I have a custom complex validation that needs to triggered first. So used a activity , where validation is being performed , later if no errors invoking pxShowReport which is not launching the report in new window
Pegasystems Inc.
IN
I doubt whether we can open a new window and show report by just calling an activity on click of the button. i need to check that at my end and confirm,
Meanwhile please consider using these alternatives
1) Call Show Harness via your activity and in that harness embed your report definition result.
2) Use of script function or other alternatives like Open URL in Window !
JPMC
IN
But before harness gets loaded I need my validation to be completed and any errors then I need through them. So in that case both the options are void.
Pegasystems Inc.
IN
Hi
>> " But before harness gets loaded I need my validation to be completed and any errors then I need through them"
Try your activity design like this.
Step 1 : Put your validate rule here. Check whether it passing the validation or not.
Step 1 transition : if the validation is not passed, then display error message and exit activity otherwise move to Step 2
Step 2 : Put your show harness here so that only after the validation gets passed , it can be executed.
Does it help ?
JPMC
IN
in this case it will not show the OOTB report viewer screen right. We need that report to be shown in the report viewer
Pegasystems
US
Is this a pop-up blockage at the browser level ? Try a different browser (IE vs CHROME) Watch for popup warning. /Eric
JPMC
IN
No Eric this is not pop blocker of browser. Anyways will give a try to see if it works in any other browsers
JPMC
IN
Its not browser level issue
Pegasystems Inc.
IN
Hi,
I have noticed that you have opened an SR with GCS for the said behavior. SR-A12382.
Please update the original post with the SR number as reference so that it can be tracked effectively.
Also please refer this mesh post URL in the SR ( Upon invoking pxShowReport from an activity, Report definition is not opening in new pop up ) so that the GCS engineer does not ask the same set of question or does not suggest you the same stuff that we have already talked about.
Accepted Solution
Pegasystems Inc.
US
The following resolution notes were included in the SR:
Include a "Run Script" on click of a button and call the function "callActivity"
<script language="javascript">
function callActivity(){
var oSafeURL = SafeURL_createFromURL(pega.u.d.url);
- oSafeURL.put("pyActivity", "");
var oWnd = pega.desktop.support.getDesktopWindow();
if (!oWnd) {
oWnd = window;
}
var strURL = oSafeURL.toURL();
- oWnd.pega.util.Connect.asyncRequest('GET', strURL);
//Please check your request and response in fiddler
if(<the property value that we are setting in the activity is true>)
{
- pega.openUrlInModal.showModalDialog(urlToOpen, window, "dialogWidth:300px; dialogHeight:100px; status:no; center:yes");
}
}
</script>