Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Exported report contains pyWorkUrgencyDraggable Control code

SA-21143

Summary



Performing an 'Export To Excel' from a Report Definition that uses the control pyWorkUrgencyDraggable to format a column results in the content, which is actual code of the control appears in the Excel sheet unexpectedly. 



Error Messages

Not applicable.

Steps to Reproduce

  1. Create a Report Definition on the class Assign-Worklist or re-use the Assign-Worklist pyWorkList instance. 
  2. Set the .pxUrgencyAssign as a first column source. 
  3. In the options set the column format to use the pyWorkUrgencyDraggable control. 
  4. Save the report then launch it. 
  5. Click OK, the clock is displayed in the browser column for Urgency. 
  6. Click Excel export link and open the generated Excel file.
  7. Click Not Ok, rule content is included in the Excel file column for Urgency. 


Root Cause



This issue was determined to be a product enhancement request as the Control pyWorkUrgencyDraggable has never been created with Export to Excel functionality included in it.
 

Resolution



Follow the steps below to create a customer specific implementation of the Control pyWorkUrgencyDraggable to amend the behavior as required:
 
1) Perform a ‘Save As’ of the Control pyWorkUrgencyDraggable into a custom application ruleset version.

Note: this is an available rule that is expected may be customized and updated in customer applications.

2) Add the following additional ‘when’ statement to the Control HTML block beneath the <pega:choose> tag to amend the behavior of the control when an export to Excel is initiated so that a blank value is provided.
 
 
<pega:choose>
<pega:when test="param.exportmode == 'excel'"></pega:when>
<pega:when test="pxRequestor.pyPegaDesignMode != 'true'">

 
The screenshot below shows the code in place within the rule instance itself for reference.

 
 
Within the custom implementation user can determine how best to present the data within the Excel export in line with the user requirement, for example:
 
1) Insert the value of the property to the cell:
<pega:when test="param.exportmode == 'excel'"><%=theValue%></pega:when>
 
2) Leave the cell blank:
<pega:when test="param.exportmode == 'excel'"></pega:when>
 
3) Insert static text in the cell:
<pega:when test="param.exportmode == 'excel'">N/A</pega:when>
 
4)    Save the updated rule.
5)    Test the Export functionality.

With this updated custom Control in place there is no need to update or amend the Report Definition configuration in order to see the required behavior when the control “pyWorkUrgencyDraggable” is used and an export is conducted.

With the local-change in place, when Export to Excel is initiated, the column that uses the Control pyWorkUrgencyDraggable will not contain the source code of the control itself.

Published April 4, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us