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

How to Export data from grid to excel

SA-12038

Summary



Developer wants export data from Repeat Grid to excel. Report Definition(RD) is the source of repeat grid.

Error Messages



No Error Messages

Steps to Reproduce



1. Create a section with Repeating Grid and provide a Report Definition as a source.
2. Apply a filter by passing a filter value to RD to filter the results in UI.
3. Embed a button in UI to call pzRDExportWrapper OOTB activity to export the results.
4. Downloaded excel will have all the results from RD.


Root Cause



Developer has embedded a button in the section above repeat grid to export grid data to excel. OOTB pzRDExportWrapper activity is called on click of button.

Grids does not support Export To Excel feature until now. The activity pzRDExportWrapper is only for Reporting needs. It may not be useful for the users to use it in Achieving Export to Excel functionality in Grids.

Developer is passing RD clipboard page as a step page because is the OOTB place that PRPC creates when it runs RD. Results are exported to Excel however, it is not behaving correctly, as it is not giving filtered results from UI.

Filters are configured in RD. it is returning results based on param.XXXX. param.XXXX values is not passing on click of export to excel button So it is returning all results every time.


Resolution



This issue is resolved through the following local change:

pzRDExportWrapper activity is used to export the results from RD and we have to pass the filter value for the filter property which is available at RD. The passed filtered value will be set to the property at activity level and the OOTB activity will run on the RD clipboard page context where the filtered property will be resolved and applied to get the filtered results.


Above scenario can be achieved with the following steps:

Add a parameter to OOTB calling activity and pass a filter value from UI(button properties), on click action set.




Before calling the OOTB pzRDExportWrapper activity on step2, add Property-Set method at step 1 and alter the step 2 to pass current parameter page as shown below



Following the above procedure helped the developer to retrieve the filtered values into the exported excel.

Published May 9, 2018 - Updated October 8, 2020

Was this useful?

33% 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