How to Export data from grid to excel
Developer wants export data from Repeat Grid to excel. Report Definition(RD) is the source of repeat grid.
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.
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.
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.
40% found this useful